Skip to content

More efficient det.split_trains() for long runs - #758

Open
takluyver wants to merge 2 commits into
masterfrom
perf/det-split-trains
Open

More efficient det.split_trains() for long runs#758
takluyver wants to merge 2 commits into
masterfrom
perf/det-split-trains

Conversation

@takluyver

Copy link
Copy Markdown
Member

Allow detector components to benefit from the more efficient splitting code in SourceData.split_trains().

Testing with a long run (~18k trains), splitting to 16 trains per part went from ~14 seconds to ~0.5 seeconds.

run = open_run(12337, 87)
lpd = LPD1M(run)

list(lpd.split_trains(trains_per_part=16))

I've also allowed frames_per_part to use the fast code path where there's a fixed number of frames per train.

@takluyver takluyver added the enhancement New feature or request label Aug 4, 2026
@takluyver
takluyver force-pushed the perf/det-split-trains branch 2 times, most recently from 5d52f5d to 7e776d1 Compare August 4, 2026 19:49
@takluyver
takluyver force-pushed the perf/det-split-trains branch from 7e776d1 to 2fd6a76 Compare August 4, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant