Skip to content

Delay import of paperqa libraries until use as the import takes over 1 second to import - #77

Merged
mattprintz merged 1 commit into
mainfrom
lazy-paperqa-import
Dec 30, 2025
Merged

Delay import of paperqa libraries until use as the import takes over 1 second to import#77
mattprintz merged 1 commit into
mainfrom
lazy-paperqa-import

Conversation

@mattprintz

@mattprintz mattprintz commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

This will delay the cost of importing until the first use instead of on application startup.

To check timing of imports (if needed):

python -X importtime -c "from biome.context import BiomeContext" 2> biome_import_timing

And you can view the result file in sorted order via:

sort -k 5nr biome_import_timing | less

@mattprintz
mattprintz merged commit 468cd66 into main Dec 30, 2025
1 check passed
@mattprintz
mattprintz deleted the lazy-paperqa-import branch December 30, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants