Skip to content
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

Cache pandoc-citekey #239

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Cache pandoc-citekey #239

merged 1 commit into from
Apr 4, 2024

Conversation

mdbenito
Copy link
Contributor

@mdbenito mdbenito commented Mar 29, 2024

As a followup to #238, this PR shaves off a few more seconds from the build by unobtrusively using functools.lru_cache to memoize the rendering of citekeys. For our 32 bib entries, and ~30 sec build this cuts time down by 8-10%.

The size of 1024 is of course arbitrary, but I assume more than enough for the majority of projects. Alternatively one can set it to None and let the cache grow indefinitely (which shouldn't be a problem in principle, but better safe than sorry :)

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.00%. Comparing base (1496fab) to head (a97e81f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
+ Coverage   97.97%   98.00%   +0.02%     
==========================================
  Files           3        3              
  Lines         198      200       +2     
==========================================
+ Hits          194      196       +2     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shyamd shyamd merged commit 602c3ec into shyamd:main Apr 4, 2024
15 checks passed
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