Skip to content

Conversation

mbollmann
Copy link
Member

First attempt at implementing caching for the library, targeting PersonIndex.

In my testing, calling anthology.people.load() takes ca. 7 seconds when building from the XML files, and ~1.5 seconds when loading from the cache file.

However, when calling anthology.load_all(), the difference is much less pronounced — maybe it's worth testing how much Collection objects would profit from caching as well.

Finally, I encountered some issues during local testing where occasionally the cache file would be loaded even though it was empty, so despite the existing tests there are some more kinks to be ironed out.

@mbollmann mbollmann added the python-library Concerning the acl-anthology-py library label Aug 19, 2025
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 98.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.32%. Comparing base (d4c7d10) to head (9b57e12).

Files with missing lines Patch % Lines
python/acl_anthology/people/index.py 96.96% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           python-dev    #5782      +/-   ##
==============================================
+ Coverage       95.28%   95.32%   +0.03%     
==============================================
  Files              35       35              
  Lines            3031     3077      +46     
==============================================
+ Hits             2888     2933      +45     
- Misses            143      144       +1     
Files with missing lines Coverage Δ
python/acl_anthology/anthology.py 89.94% <100.00%> (+0.56%) ⬆️
python/acl_anthology/collections/collection.py 98.41% <ø> (-0.02%) ⬇️
python/acl_anthology/config.py 100.00% <100.00%> (ø)
python/acl_anthology/people/name.py 98.01% <ø> (ø)
python/acl_anthology/people/person.py 100.00% <100.00%> (ø)
python/acl_anthology/people/index.py 97.61% <96.96%> (-0.09%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mjpost
Copy link
Member

mjpost commented Aug 20, 2025

Just request the review when you want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python-library Concerning the acl-anthology-py library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants