Repository navigation
Lazily prepare execution-server function catalog - #180
Merged
Merged
Conversation
Bind fresh-server startup to direct-import pipeline needs. Initialize the external virtual-module projection only when pipeline source imports it, and serialize concurrent metadata loading for catalog requests. Refs #165
Save fresh-server 30-case timing, native-relative figures, and exact-output parity for the on-demand catalog change. Refs #165
Collaborator
Author
|
Issue #179 is being fixed by the blind-analysis integration owner on fix/compile-observation-identity-20260929. zmq_execution_server.py changes are confined to compilation_signature on ZMQExecutionContext, _resolve_compilation, and _store_compile_artifact. No function-catalog startup/preparation edits; your lazy-catalog ownership stays separate. _export_runtime_observation is unchanged (PR #157 owns that path). |
trissim
marked this pull request as ready for review
September 29, 2026 13:35
trissim
changed the base branch from
codex/perf-cached-registry-inventory
to
main
September 29, 2026 17:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fresh client-owned execution server currently builds the complete function catalog before binding, then waits for it again before running a pipeline. Converted CellProfiler pipelines import their functions directly, so that catalog work adds startup latency without helping their execution.
Bind the endpoint first and prepare the catalog on the first catalog request. Before evaluating pipeline source, inspect its imports and initialize the registry when it needs a registry-created virtual module; direct imports proceed without that global projection. Concurrent catalog and pipeline requests share one metadata load. This keeps catalog reads and external virtual imports available while shortening fresh execution startup.
On the same CPU-only integration checkout, the official30 one-well fresh-server sweep passed 30/30 and all 110 produced result files matched the control byte for byte. The sum of per-observation totals fell from 311.858 to 274.266 seconds (−37.592; all 30 cases faster, median −1.171 seconds). Non-job time fell by 58.822 seconds; compilation rose by 25.126 seconds as some registry work moved there. The execution-job difference is run variation and is not claimed as an effect of this patch. A live client fetched all 266 catalog functions on demand after connecting.
Raw CSVs, native-relative figures, and timing boundaries are included. Validation: 104 focused tests passed on this PR branch; Black and
git diff --checkpassed. Ruff is not installed in the local benchmark venv.Refs #165. This PR is stacked on #167 because it reuses the registry inventory lock added there. The benchmark checkout also contained other pending performance changes, including the direct-docstring dependency update in #175; only the lazy-catalog code changed between the paired CSVs.