Repository navigation
Defer segment source requests until cache misses - #96
Closed
phillipleblanc wants to merge 1 commit into
Closed
phillipleblanc wants to merge 1 commit into
phillipleblanc wants to merge 1 commit into
Conversation
Create the source request only after a cache miss so warm cache hits and unpolled requests do not enqueue speculative reads. Signed-off-by: Phillip LeBlanc <879445+phillipleblanc@users.noreply.github.com>
lukekim
approved these changes
Sep 17, 2026
This was referenced Sep 17, 2026
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.
WHAT
Consult the segment cache before creating a source request, so hits and unpolled requests do not register a delegate read. This is a draft experiment with no demonstrated lookup performance benefit; the proposed warm-cache OS-open elimination criterion failed.
WHY
An eager delegate can register work before a cache hit makes it unnecessary.
HOW
Keep miss population and cache-error fallback unchanged; add four regression tests (three fail before the change). All 307 layout/file nextest tests, pinned-toolchain scoped Clippy and formatting pass; built Spice with this exact fork and verified real fixture counts/results, full scans, 64-client profiles and 3,000/s offered profiles.
Paired CPU ms/lookup before → after: no-index 8.068 → 8.332; indexed 4.552 → 4.531; indexed arrival 3.784 → 3.773. Warm read calls and OS-open samples persist. Do not merge for the predicted performance gain.
Detailed local evidence includes exact source/build digests, commands, raw profiles, capture gates and limits; artifacts are retained locally, not uploaded. Runtime validation depends on spiceai/spiceai#14149 and instrumentation spiceai/spiceai#14174; this fork diff has no runtime dependency or machine-local dependency pin. No lab signoff was run, as explicitly instructed.