Repository navigation
Speed up guarded bulk edits and 10k-task hydration - #689
Merged
Merged
Conversation
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.
Refs #602
Exact task reads no longer wait for the trailing UI notification before a bulk edit can capture the next row. Each row still reconciles the index, rereads its current record and validates its task model before submission. A retired read still waits before trying again. Summary decoding resolves field aliases once per model. Single-field groups skip a redundant serialization and recurrence cache hits skip parsing the date range.
Measurements
Base
82f2d881and head15a59a34both use production SDK 0.2.61. Each cell gives median / nearest-rank p95 in milliseconds, five observations per cell. At this sample size p95 is the slowest observation.Median throughput for the cold 32-row operation rose from 4.1 to 851 edits/s. The reduction is consistent with removing 31 separate 250 ms notification waits. Filter/sort, pending-title lookup and the ACK path are comparison measurements. The isolated browser samples overlap, especially on reload.
The Node/Vitest run (Node 22.22.0, AMD EPYC 9B14) opens five fresh MemoryReplica and SDK repository sessions. Each session repeats the workload over the same 10,000 tasks, four custom fields including a legacy spelling, 80 projects, and 2,500 daily or weekly series. Cold index includes initialization and a stats read. Warm index measures a stats read after the index is hydrated and the trailing notification has settled. Bases preview filters and sorts 8,000 matches by title, then groups them into 64 projects. The recurrence range changes across sessions and repeats within each session.
Bulk capture applies the real guarded bulk action to 32 records with SDK confirmations held. The benchmark checks the 32 pending writes, releases them together and waits for both the repository ACK readers and the ledger to drain. These are in-process local-capture and acknowledgement timings. Radio loss, network throughput, process restart and native Core are outside this timing harness.
The Chromium 149.0.7827.55 fixture alternates the order of base and head across five fresh browser contexts per revision. Cold opens a fresh context, warm reloads the same context and opens a fresh fixture repository. Timing starts at the Open button and includes fixture seeding, SDK open, the first visible task row and two animation frames. A Chromium CPU profile on the starting branch showed fixture seeding, hashing, change classification, summary projection and React rendering. This browser measurement does not isolate production SDK
mdbase:open:stage:apply; #602 still needs a matched hosted cold-open trace.Reproduce
Run in the head checkout:
To benchmark the same harness on the base, create a separate checkout of
82f2d881, copybenchmarks/collection-session.perf.tsand the singlebench:collection-sessionpackage script into it, then run the same commands. For Chromium, startpnpm dev:e2e --host 127.0.0.1 --port 4286in the base checkout andpnpm dev:e2e --host 127.0.0.1 --port 4283at head. From head run:Verification
The 0.2.61 benchmark and application typecheck passed. The full coverage suite and desktop Playwright checks are running on this head. Regression coverage exercises an exact read after a peer edit while a notification is pending, local write capture, legacy custom-field spellings, and canonical values on write.
Investigated #544. The offline-shell rewrites landed in #675. Public GETs for both
/index.htmland/404.htmlreturned 200 HTML without redirects. The pinned SDK owns pairing exchange and sign-in polling. No sign-in code or console suppression is included in this PR.