Use query range to solve hanging video overlay generations - #2845
Conversation
Automated PR Review (Claude)0. SummaryVerdict: MINOR SUGGESTIONS Minor items to consider: 1.1, 1.2 This PR replaces the 1. Correctness & Implementation Bugs1.1 The new comment (diff line 77) correctly notes "fixed-width 13-digit epochs", and Consider zero-padding the epoch in 1.2 After this change, (Retracted — this is informational, not a bug.) 2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance
5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene — ✅8. Tests8.1 The 9. Documentation — ✅10. Nitpicks / Optional10.1 Generated by Claude. This is advisory; a human reviewer must still approve. |
Review follow-up — round 1Done
Won't change (with reasoning)
Deferred
|
5bacb3a to
19787f7
Compare
|
/review |
Automated PR Re-review 2 (Claude)Comparing The previous two commits were force-pushed/squashed into a single commit, so the incremental diff covers the full PR change. Re-checked against Previous findings status
Discussion since last review@rafaellehmkuhl posted a follow-up comment confirming: 1.1 and 10.1 are done, 1.2 was already retracted, and 8.1 is deferred ("there's no IndexedDB test harness in the repo today and this PR is a focused perf fix"). Agreed — deferring 8.1 is reasonable for this scope. New findings0. SummaryVerdict: READY TO MERGE This PR replaces the 1. Correctness & Implementation Bugs — ✅2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
Swap the temporary sensor-log points store from a localforage instance to the project's own IndexedDbStore. Behavior is unchanged; this sets up a later switch to native key-range queries.
Generating the telemetry overlay used to scan the whole temporary log store (load every key, then read each in-range point one by one), so it got slower as the store grew — eventually hanging/crashing during video processing. Read only the recording's time window via a native getAll(IDBKeyRange) range query. Keys are zero-padded epochs so they sort chronologically, letting the range query match the numeric window. Point-filtering logic and output are unchanged.
19787f7 to
6029e8b
Compare
|
/review |
Automated PR Re-review 3 (Claude)Comparing The previous single squashed commit was split into two logical commits (refactor + perf). The net code change is identical to what was reviewed in seq 2; the incremental diff covers the full PR diff because the old single commit was replaced. Previous findings status
New findings0. SummaryVerdict: READY TO MERGE This PR replaces the 1. Correctness & Implementation Bugs — ✅2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
Generating the telemetry overlay used to scan the whole temporary log store (load every key, then read each in-range point one by one), so it got slower as the store grew — eventually hanging/crashing during video processing.
Now the temporary store uses
IndexedDbStoreand reads only the recording's time window via a nativegetAll(IDBKeyRange)range query. Cost scales with recording length instead of total store size. Point-filtering logic and output are unchanged.Fix #2844.