Skip to content

Conversation

padix-key
Copy link
Member

This PR caches subsequent calls of structure.info.residue() to make a common application like creating a chain from scratch more efficient, as many calls to pdbx.get_component() accumulate quite some run time.

To keep the memory footprint still very low an LRU cache with maximum size 100 is used. This is enough to cache the number of different residues to build polymer chains (peptides, nucleic acids, saccharides), but will not blow up the memory requirements for use cases where large parts of the CCD are parsed.

Copy link

codspeed-hq bot commented Jul 24, 2025

CodSpeed Performance Report

Merging #817 will not alter performance

Comparing padix-key:cache-info (64f1259) with main (dc996a5)

Summary

✅ 59 untouched benchmarks

@padix-key padix-key merged commit 105bc68 into biotite-dev:main Jul 27, 2025
24 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.

1 participant