Repository navigation
perf(explorer): batch run reads and reuse entity scans - #81
Merged
Merged
Conversation
morluto
marked this pull request as ready for review
October 6, 2026 19:54
Collaborator
|
Hi @morluto! Welcome to the project, and thank you for your contribution! I looked at the PR, LGTM overall but we should address the Greptile reviews before we can merge it. |
psinghal20
approved these changes
Oct 7, 2026
psinghal20
left a comment
Collaborator
There was a problem hiding this comment.
Approved, Thanks for addressing the feedback!
Collaborator
|
Mind resolving merge conflict |
Collaborator
|
lgtm, thanks |
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.
Closes #78.
Reuse each run-group list request's run records, group them once, and fetch only the selected page's instances in batches of at most 500 IDs. Share funnel aggregation across list/detail paths; detail and SSE polls continue to obtain fresh state.
Unfiltered entity pages now obtain latest rows and distinct totals through one concrete store operation. Generic implementations share one scan; custom pagination/count overrides and namespace routing retain their behavior.
Timings cover Python endpoint functions and temporary SQLite stores, excluding HTTP/network latency. Python 3.12.13 on macOS arm64; baseline
602d730; median of three calls. Both fixtures produce identical response hashes. Both fixtures now seed the production instance-ID index. SQLite ID batches search that index; DynamoDB uses consistent primary-key batches of at most 100 keys and retries unprocessed keys. Remote-provider latency is unmeasured.Reproduce:
Validation:
Separate commits keep run-group batching and entity-page scan reuse reviewable. This PR is independent of the task, journal and existing context-diff PRs.
The PR appears safe to merge; the prior findings are addressed, and no new actionable issue was found.
What we checked:
Summary
Explorer run-group lists now reuse run records and fetch instances in batches, while unfiltered entity pages share the work used to get rows and totals. These changes reduce repeated store reads for both workloads.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Run-group list] --> B[Read runs once] B --> C[Select group page] C --> D[Batch-read selected instances] D --> E[Build group counts and rows] F[Entity list] --> G[Latest-per-ID page and total]Reviews (3) · Last reviewed commit: "fix(explorer): resolve conflicts with la..." · Reviewed by Greptile