Skip to content

Speed up long-form object measurement spreadsheet folding - #195

Merged
trissim merged 6 commits into
mainfrom
codex/perf-long-form-export-pr
Sep 29, 2026
Merged

trissim merged 6 commits into
mainfrom
codex/perf-long-form-export-pr

Conversation

@trissim

@trissim trissim commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and result

ExportToSpreadsheet folds millions of long-form object measurements for the ImagingFlow plate. The generic accumulator recomputes ownership, source scope, and subject maps for every cell even when the table contract fixes object scope and has one image identity and one object ID. This change keeps WideMeasurementRowAccumulator as the sole folding authority and uses a direct loop for that declared shape; other shapes retain the existing path. Duplicate-value conflicts, feature projection, row order, and CSV values are preserved. Fixes #194.

A saved 8-well batch replay improved from about 25.1 to 20.2 seconds with identical 92 MB CSV bytes. In warmed ordinary ZMQ 16-well ImagingFlow runs, execution and total both fell by about 10.5 seconds:

Branch-matched pair Execution Total
Exact PR stack on #193 171.049 → 160.498 s 184.284 → 173.733 s
Integration checkout with pending #157/#170/#175/#191/#193 126.078 → 115.808 s 139.305 → 128.913 s

The warmed official30 one-well suite changed from 80.329 to 79.350 seconds execution and 214.708 to 213.524 seconds total. All 30 cases succeeded and all 110 generated files matched byte for byte; the exact-stack 16-well CSV also matched its parent. Seventy-two focused unit tests passed on this PR branch. Black, changed-line Ruff E/F, and diff checks passed.

The report and fresh figure include raw timings and a native CellProfiler comparison. The earlier 985.625-second native 16-well value is a 16× cold-launch projection. PR #197 measures native CP at 59.680 seconds for one well and 388.431 seconds for 16 wells/four jobs, making the matched warmed execution ratios 3.16× and 3.35×. The report labels the historical projection separately.

This PR is stacked on #193. The separate #170/#175 changes are present only in the integration checkout, so comparisons are branch-matched and absolute runtimes differ across the two checkouts.

@trissim
trissim marked this pull request as ready for review September 29, 2026 13:35
Issue #196 now has a measured warm native four-job pilot. Label the prior 16× cold-launch projection distinctly and account for compilation and fresh-server overhead in PR #195's reported total time.
Use PR #197's clean four-job evidence and exact warmed one-well ratio for issue #196.
Record unprofiled stage timings and an exact-byte dense writer prototype to bound follow-up work for #194.
@trissim
trissim changed the base branch from codex/perf-plate-input-transport-pr to main September 29, 2026 18:01
@trissim
trissim merged commit fb07ec9 into main Sep 29, 2026
1 check failed
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.

Reduce repeated object-scope work in long-form spreadsheet measurement folding

1 participant