Skip to content

Add caching for external gain maps#882

Open
phyy-nx wants to merge 2 commits intomainfrom
cache_gain_map
Open

Add caching for external gain maps#882
phyy-nx wants to merge 2 commits intomainfrom
cache_gain_map

Conversation

@phyy-nx
Copy link
Copy Markdown
Contributor

@phyy-nx phyy-nx commented May 4, 2026

For dials.stills_process which doesn't (yet) use ImageSequences, each image has an image set, so if an external gain map is used, it is loaded once for each image. This adds a simple cache to speed that up and reduce memory during load.

phyy-nx and others added 2 commits May 3, 2026 18:29
For dials.stills_process which doesn't (yet) use ImageSequences, each
image has an image set, so if an external gain map is used, it is loaded
once for each image.  This adds a simple cache to speed that up and
reduce memory during load.
@phyy-nx phyy-nx moved this to High priority/next up in DIALS Spring Performance Updates May 4, 2026
phyy-nx pushed a commit to cctbx/cctbx_project that referenced this pull request May 5, 2026
phyy-nx added a commit to cctbx/cctbx_project that referenced this pull request May 5, 2026
phyy-nx added a commit to cctbx/cctbx_project that referenced this pull request May 5, 2026
@ndevenish
Copy link
Copy Markdown
Collaborator

Suggest LRU cache or similar. If many external gain maps, this just ends up storing them all, forever...

@dwpaley
Copy link
Copy Markdown
Contributor

dwpaley commented May 7, 2026

Points from dials meeting:

  • Flag for reversion after ImageSequence adoption
  • Switch to LRU cache

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.

4 participants