[codex] Add async loading and performance caches#13
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements a background job system and multi-layered caching to enhance performance and UI responsiveness, supported by new benchmarks and instrumentation. Key features include asynchronous session loading, a Level of Detail (LOD) system for graph rendering, and spatial indexing for track map interactions. Feedback suggests further optimizations such as offloading LOD generation to background threads, utilizing binary search for visible data filtering, and reducing draw calls in the track map by grouping segments of the same color. Additionally, improvements to memory management for the math expression cache and the removal of redundant Arc usage in background tasks were recommended.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77e593e664
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Branch ReviewTwo commits, 30 files, ~4,300 LOC. A well-scoped performance pass: moves blocking work off the UI thread and adds memoization around the hottest render paths. What it does
Correctness
Minor
TestsGood coverage for the new machinery: workspace-restore-defers-until-math-settled, fingerprint invalidation for zoom/transform/replacement, math job IDs survive list reorder, track-map cache reset. Core has an integration_tests file now too. Bench harness is wired and the baseline is captured in RecommendationFix #1 before shipping — silent channel-decode failure is user-visible. #2 is worth at least a |
What changed
Why it changed
Large sessions were doing too much work synchronously on the UI thread, which caused slow loads and expensive redraws. This change shifts the heavy work off the hot path while preserving correctness for workspace restore, math dependencies, and graph rendering.
Impact
Root cause
The original implementation decoded and derived data synchronously, and the first async refactor still had correctness gaps around deferred workspace restore, index-based math jobs, and stale render caches.
Validation