scipp / scipp/ess

Performance considerations related to pixel grouping

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

essimaging
Dominant language
Python
Stars
1
Forks
3
Avg merge
2d 11h
Merged PRs (30d)
17

Description

There is an ongoing discussion about sub-pixel handling (done upstream), resulting in quite large effective pixel counts in the NeXus files (I have seen numbers from 1024^2 to 5000^2 thrown around). At least towards the higher end, I expect that grouping into pixels becomes increasing inefficient (falling out of CPU cache, ...). We may want to avoid doing this automatically when loading, keeping a flat list of events initially. Of course grouping into pixels later on may still be required, but maybe that can be more manageable with more control of resolution.

To keep the list of pixels flat, we obviously would need to have information such as pixel position for each event. Naively, this would also suffer from CPU cache problems, if the list of positions does not fit into, say L3 cache.

Under the assumption that the positions are regular, we could decompose into 1-D x and y vectors, performing 2 small lookups instead of 1 large. We would need to compute x and y pixel indices from the flat pixel ID (div and mod).

This is just a note for the future to keep in mind, in case we indeed experience performance issues. No need to take any action now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points and explicitly records a future concern rather than an actionable change. Start by reviewing the discussion about sub-pixel handling and measuring pixel-grouping behavior at the mentioned effective pixel counts. Done would require an agreed approach and evidence that the resulting loading or grouping behavior addresses the performance concern.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.