-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip building bib_data if files are older than config time (for mkdocs serve) #240
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #240 +/- ##
==========================================
- Coverage 97.97% 96.20% -1.78%
==========================================
Files 3 3
Lines 198 211 +13
==========================================
+ Hits 194 203 +9
- Misses 4 8 +4 ☔ View full report in Codecov by Sentry. |
@shyamd I see the errors. Sorry about that. I'll look into it and get back to you |
Thanks for all these performance improvements and no worries on the failing tests. Took me awhile to turn on tests for your PRs. |
I re-named the attribute that you used for holding the last config time. The fact that it wasn't throwing an |
Thanks for all these performance improvements. Next minor version bump will include them. |
My pleasure. Thank you for the plugin! |
This PR is a continuation to #238.
on_startup()
to avoid unloading the plugin when usingmkdocs serve
.on_config()
by storing thetime()
of the first run, then checking the timestamps of the bibtex files passed by the user. If any file is newer all refs are read again.The speedup is only noticeable after merging #238, but with both PRs together, our re-build using
mkdocs serve
goes from ~41secs to ~25 secs, or a 40% total reduction in build time. This makes working on documentation much nicer :)