Skip to content

perf(runtime-host): reduce repeated encoding across 16 page builders - #5166

Open
chinawch007 wants to merge 3 commits into
apache:mainfrom
chinawch007:perf/memory-pagination-5038
Open

perf(runtime-host): reduce repeated encoding across 16 page builders#5166
chinawch007 wants to merge 3 commits into
apache:mainfrom
chinawch007:perf/memory-pagination-5038

Conversation

@chinawch007

Copy link
Copy Markdown
Contributor

Summary

The Storage/Runtime Host read-path audit found 11 additional page builders with the same repeated-encoding pattern as the five examples in #5038. This PR optimizes all 16 builders in packages/runtime-host: each previously copied the accepted-item array and serialized the entire candidate page after every append, only to discard that encoding after checking its size.

Refs #5038 — first delivery item: encoding and page assembly.

  • Original five: Memory entries, Artifact pages, Plan pages, Session catalog, and Runtime resource pages.
  • Additional eleven: Project catalog, Connection catalog, Project directory, Scheduled tasks, Pricing, Usage buckets, Usage logs (LLM/tool), Skill catalog, Invocable skills, Plugin platform, and External session catalog.

A shared JsonArrayPageBudget measures the fixed page envelope once, encodes each candidate item's UTF-8 JSON once during budgeting, and adds separators and the actual candidate cursor/nextOffset. Items are appended in place only when the candidate fits. This removes the repeated array copies and whole-page size checks, so already accepted items are no longer re-encoded for each subsequent candidate.

Existing projections, item/byte limits, cursor reservation, revisions, and error behavior are preserved. Result-object budgets remain distinct from message-frame budgets; final messages continue through the existing protocol validation and encoding path. There is no intended externally observable behavior change.

Verification

  • Behavior: 313 tests across 30 affected test files passed. Coverage includes UTF-8/JSON escaping, exact byte boundaries, rejected candidates, and complete pagination. The 17 pagination behavior checks also pass against the baseline implementation; deliberate byte-undercount and cursor defects fail the relevant tests as expected.
  • Static checks: affected TypeScript builds/checks, Biome lint/format checks, and git diff --check passed. Validation is scoped to the affected code and suites; full-repository CI parity is not claimed here.
  • Performance: compared 30cf0beb0def57626df3fdbf8c7ab4d0d3436896 with 81bed5f8100512b00977a08d5a313c3c29f29c45 under identical workloads. The primary experiment covers all 16 real query paths, 58 datasets, and 102 request workloads, from actual data reads through protocol validation, outbound encoding, in-memory transport, and consumer decoding. Another 93 workloads isolate page/protocol costs. Each version receives 30 warm-ups and 100 timed samples per workload, totaling 39,000 samples.
  • Results: all 87 multi-item primary workloads reduced cumulative serialization bytes; 92/102 improved median query time. Representative larger first-page queries reduced median time by 54.6% for Memory, 74.8% for Plugin platform, and 5.2% for Plan. Single-item workloads encode four extra bytes. All results, including non-improvements and median/p95 timings, are retained; serialization-work checks separately assert reduced encoding across all 16 paths.

These are local synthetic warm-query measurements. Usage buckets/LLM logs have an empty canonical ledger; Runtime Resource has empty transcript history. The report does not measure retained memory/RSS, cold-process latency, socket/UI timing, or SQL scan/WAL costs, and makes no improvement claims for those metrics.

Benchmark package: 5038-pagination-benchmark-81bed5f-v1.zip contains English/Chinese reports, scripts, fixtures, raw samples, and a standalone verifier.

5038-pagination-benchmark-81bed5f-v1.zip

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex assisted with code-path analysis, implementation, tests, benchmarks, and documentation. The implementation commit includes Generated-by: OpenAI Codex; retain this trailer in the squash commit.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

The first item includes the benchmark's serialization-work assertions; behavioral checks intentionally preserve and pass against the baseline semantics. Local check coverage is described under Verification.

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/XL Under 2500 readable lines label Sep 10, 2026
@chinawch007

Copy link
Copy Markdown
Contributor Author

性能测试报告


英文版本

Issue #5038: Pagination Assembly Performance Report

Outcome and scope

This report measures all 16 real pagination entry points, including variations in Connection catalog size, item length, and page position. Both Usage LLM and tool logs reference real Sessions and read their titles from the actual Session store. Shared-session and multiple-session workloads verify title reads and returned text for each request workload. The primary experiment contains 58 datasets and 102 request workloads, plus 93 page/protocol replay and supplementary Memory storage workloads. In total: 195 workloads and 39,000 timed samples.

This documentation revision makes two workload boundaries explicit: canonical rows = 0 for Usage buckets / LLM logs, and transcript messages = 0 for Runtime Resource. Measured scripts, fixtures, and raw samples are unchanged; the benchmarks were not rerun for this clarification. Measurement intervals and all performance values below are retained.

The production change remains the five original examples plus 11 additional pagination functions: 13 business source files and one shared budget helper. JsonArrayPageBudget accounts incrementally for the fixed envelope, item UTF-8 JSON bytes, separators, and candidate cursor, replacing repeated array copies and whole-page encoding. Result budgets, projections, cursors, revisions, item limits, errors, and final protocol validation are preserved.

Complete pagination results match between versions for every primary dataset and are checked against expected items or identities. Each request workload is checked for equivalent production/decoded results and identical transmitted byte counts before timed sampling. Repeated encoding decreases for multi-item pages, while unchanged reads, scans, parsing, and projections remain in real-query timings. Whole-query speedups can therefore be smaller than page/protocol speedups; small or final pages may not improve. All results are retained without latency-based filtering.

Versions, environment, and sampling

  • Baseline commit: 30cf0beb0def57626df3fdbf8c7ab4d0d3436896.
  • Optimized branch and commit: perf/memory-pagination-5038 / 81bed5f8100512b00977a08d5a313c3c29f29c45.
  • Primary measurement interval (UTC): 2026-09-10T08:36:07.234Z2026-09-10T08:39:42.243Z.
  • Supplementary measurement interval (UTC): 2026-09-10T08:40:12.466Z2026-09-10T08:40:55.775Z.
  • Report re-verification time (UTC, not measurement time): 2026-09-10T13:19:06.296469+00:00.
  • Node v24.18.0; darwin/x64; CPU Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz.
  • Source-file-list digest (SHA-256): 43c4a598860a60528965ff61fd031f9165b74148bc77881996d4a66909179f9a; source-manifest.json.
  • Both versions are built from explicit commits; baseline sources are extracted with git archive. All 29 changed files are checked against their committed contents. Unchanged workspace dependencies are shared. Build and lockfile hashes are in build-manifest.json. HEAD and a clean source working tree are checked before and after measurement.
  • Each workload receives 30 warm-ups and 100 timed samples per version, alternating before/after order. Counters are collected separately; JSON/SQLite hooks are disabled during timing. Median averages the two middle sorted samples; p95 is the 95th sorted sample. All raw samples are retained.
  • Primary results are warm queries: traversal verification has already primed application caches. initialQueryMs separately records the first query on newly created coordinators/adapters, but it is a single observation against shared seeded storage with no OS cache eviction. It is not a cold-process or cold-disk latency comparison. External Session timings include directory/stat checks with the real adapter's warm summary cache.

Primary experiment: real paths and workload boundaries

All primary workloads use valid inputs through decodeRequestFrame → actual query handler → dispatchOperation output validation → BoundedSerialOutboundWriter → in-memory transport → production decodeHostFrame. The private-page-function loader is not used. Data is seeded through real store APIs or valid file formats outside timing, as is cleanup. Queries are not mocked with preassembled pages. Fixed capabilities and workload restrictions are identified below.

Path Producer / read source Query authority Datasets Request workloads
Artifact SessionStore.probeSessionRemoval and ArtifactStore.listPage (real SQLite metadata and artifact files) HostArtifactCoordinator 3 5
Plan PlanStore.readState and execution Session store (SQLite) HostPlanCoordinator 3 5
Session catalog Execution SessionStore.listCatalogPage (SQLite) and SessionManager live-state projection HostSessionCatalogCoordinator 3 5
Runtime resource SQLite ShellRun store -> ShellRunProcessManager -> SessionManager (transcript messages = 0; no event/run history) HostRuntimeResourceCoordinator 3 5
Project catalog ProjectCatalog.list (real SQLite records and filesystem availability checks) HostProjectCatalogCoordinator 3 4
Scheduled tasks ScheduledTaskStore.list (real SQLite) HostScheduledTaskCoordinator 3 5
Connection catalog Runtime Policy ConnectionCatalog.getSnapshot (JSON file store) -> model-catalog resolution and cursor lookup HostRuntimePolicyCoordinator 5 10
Pricing Pricing store snapshot (SQLite) merged with bundled pricing HostUsagePricingCoordinator 3 9
Usage buckets Telemetry SQLite buckets and canonical runtime usage merge (no Session-title lookup in this production branch); canonical rows = 0 HostUsagePricingCoordinator 3 5
Usage logs / llm Telemetry SQLite LLM logs, canonical runtime usage merge and real execution SessionStore.readHeaderSnapshot title reads; canonical rows = 0 HostUsagePricingCoordinator 5 9
Usage logs / tool Telemetry SQLite tool logs and real execution SessionStore.readHeaderSnapshot title reads (no canonical LLM merge) HostUsagePricingCoordinator 5 9
Skill catalog Real Skill files, filesystem scan, metadata/lock parsing and workspace resolver SkillCatalogRepository through HostSkillCatalogCoordinator (fixed Read capability for new-session invocable queries) 3 5
Invocable skills Real Skill files, filesystem scan, metadata/lock parsing and workspace resolver SkillCatalogRepository through HostSkillCatalogCoordinator (fixed Read capability for new-session invocable queries) 3 5
Plugin platform Recovered HostPluginPlatform composition runtime: read lane, inspect and flatten actual entries HostPluginPlatformCoordinator 4 7
External session catalog Real Claude Code adapter directory/stat reads and cached transcript summaries; SQLite batch import lookup HostExternalSessionCoordinator 3 5
Project directory Real filesystem enumeration, realpath/stat and sort HostProjectDirectoryAuthority through HostProjectCatalogCoordinator 3 5
Memory Real Runtime Policy and Memory bundle reads plus Markdown parsing HostMemoryCoordinator 3 4

In dataset names, n is the seeded record count and text is a fixture text-length parameter, not a byte count. General text includes CJK characters, emoji, quotes, and backslashes; production APIs still enforce field-specific length limits. Connection model counts are per connection. Pricing includes bundled prices, and Project catalog projects both projects and locations, so result counts can exceed seeded record counts. Exact fields and generators are in authority-cases.mjs. Production item and byte limits are not increased.

The three Runtime Resource datasets seed only persisted terminal ShellRun records (1 / 8 / 70), without launching processes. Session events, run history, and transcript messages are empty: transcript messages = 0. The real SessionManager message-read/projection entry point executes, but there is no nonempty history to parse, traverse, or use for inherited-resource enrichment. These timings describe the empty-history workload, not queries with substantial conversation history.

The downstream consumer for every path is the production protocol decoder. Other workload boundaries: Plugin measures the entries view; other views share its builder. External Session uses the real Claude Code file adapter and SQLite batch lookup with no prior imports. Usage logs measures both LLM and tool entry points. Invocable Skills uses a new-session context, real workspace resolution, and a fixed Read-tool capability. These choices restrict workloads without substituting data reads or pagination algorithms.

SQLite counts are rows returned by StatementSync all/get/iterate, not rows scanned internally. JSON parse counters include storage and protocol parsing. Serialization counters include actual request validation, reads/projections, pagination, final encoding, and consumer decoding. SQL run calls are recorded separately and are not write/WAL byte counts. Peak memory, RSS, GC, SQL scan/sort work, and WAL bytes were not measured; no improvements in those metrics are claimed.

Representative real-query results

For each path, select the first page of its largest normal dataset. The main Usage logs row uses LLM with 130 logs across 16 Sessions; other workloads appear in the dedicated and full tables. Plugin's additional large-item boundary case is also retained in the full table. All arrows mean before → after; encoding volumes are cumulative UTF-8 bytes and timings are milliseconds.

Path / dataset / position Admitted Cumulative encoding bytes Encoding reduction Median ms p95 ms
Artifact / n130-text80 / first 21 1,077,364 → 548,063 49.1% 8.851 → 7.440 10.797 → 8.384
Plan / n33-text180 / first 12 3,497,261 → 3,099,297 11.4% 20.095 → 19.048 22.136 → 20.772
Session catalog / n70-text30 / first 32 624,498 → 198,438 68.2% 3.823 → 2.436 4.372 → 2.877
Runtime resource / n70-text180 / first 10 1,277,926 → 988,814 22.6% 9.148 → 8.414 10.774 → 9.919
Project catalog / n40-text60 / first 50 1,520,298 → 271,012 82.2% 5.463 → 2.204 6.580 → 2.595
Scheduled tasks / n70-text180 / first 16 1,071,366 → 346,437 67.7% 6.403 → 4.277 8.094 → 5.934
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Pricing / pricing-n130-text30 / first 122 3,270,688 → 246,190 92.5% 8.100 → 2.310 8.983 → 2.596
Usage buckets / buckets-n130-text30 / first 42 1,283,238 → 241,966 81.1% 8.501 → 7.036 8.957 → 7.976
Usage logs / llm-n130-text30-sessions16 / first 34 1,104,950 → 245,621 77.8% 10.856 → 9.265 14.488 → 13.040
Skill catalog / n140-text30 / first 38 1,368,436 → 418,896 69.4% 48.278 → 45.091 53.358 → 54.501
Invocable skills / n140-text30 / first 56 1,806,492 → 418,956 76.8% 49.144 → 44.716 52.760 → 51.472
Plugin platform / n130-text80 / first 64 5,347,498 → 871,874 83.7% 18.579 → 4.679 24.210 → 6.011
External session catalog / n40-text80 / first 16 83,806 → 29,735 64.5% 2.710 → 2.551 3.072 → 2.888
Project directory / n260-text10 / first 128 834,123 → 59,427 92.9% 11.323 → 9.169 13.147 → 10.892
Memory / n96-text30 / first 60 1,680,370 → 195,179 88.4% 7.607 → 3.453 8.051 → 3.984

In this primary run, 10 of 102 workloads have a higher after median than before. All remain in the full table. One local experiment cannot establish small differences as stable regressions, nor guarantee speedups for every workload. Reduced repeated page encoding and changes in whole-query latency are evaluated separately.

Usage logs: real Session title reads

Each of LLM and tool has five datasets: 1 log / 1 Session, 8 / 1, 8 / 8, 130 / 1, and 130 / 16. Logs reference Sessions round-robin in creation order and are queried newest-first. Titles contain CJK characters, emoji, quotes, and backslashes. They stay within the 80-code-point Session name limit and below the Usage projection cap; returned titles are independently checked against the seeded text.

The coordinator uses the same sessionStore.readHeaderSnapshot(sessionId).name dependency as the application. Title resolution precedes byte-limited assembly and reads each distinct Session in the candidate logs once; it can therefore read more Sessions than the final page contains. A dependency probe runs only in the separate counter pass, asserting the exact read set/count and expected titles on returned rows. The original reader is restored before warm-ups and timing; real store reads remain inside the timed path. Full traversal also verifies every log identity, Session association, and title.

Usage buckets reads groups and merges canonical runtime usage without Session title lookup, matching production. Tool logs reads its telemetry ledger and Session titles without the LLM canonical merge. These paths are described separately. Earlier untitled Usage log results are archived and are not mixed into this run. Since this workload adds Session references and titles, differences between the old and new benchmark runs cannot be attributed to a code change.

Usage buckets and LLM logs seed records only in telemetry; the canonical model-call ledger is not populated, so canonical rows = 0 in every relevant dataset. Real canonical-read and merge entry points execute, with nonempty telemetry merged against empty canonical data. This does not cover chronological log merging, canonical-record projection, or matching-key bucket aggregation with both sources populated. Log merging is not described as ID-based deduplication. This limitation does not apply to tool logs, which does not perform canonical merging.

Dataset / position Candidate logs Total Sessions Title reads Titled rows Median ms p95 ms
llm-n1-text2-sessions1 / first 1 1 1 → 1 1 1.435 → 1.440 1.627 → 1.773
llm-n8-text8-sessions1 / first 8 1 1 → 1 8 1.891 → 1.844 2.199 → 1.983
llm-n8-text8-sessions8 / first 8 8 8 → 8 8 2.636 → 2.589 2.878 → 2.923
llm-n130-text30-sessions1 / first 100 1 1 → 1 34 9.321 → 7.887 10.294 → 8.668
llm-n130-text30-sessions1 / middle 96 1 1 → 1 34 8.706 → 7.132 9.397 → 7.901
llm-n130-text30-sessions1 / last 28 1 1 → 1 28 6.093 → 5.074 7.140 → 5.558
llm-n130-text30-sessions16 / first 100 16 16 → 16 34 10.856 → 9.265 14.488 → 13.040
llm-n130-text30-sessions16 / middle 96 16 16 → 16 34 10.243 → 8.659 12.748 → 11.417
llm-n130-text30-sessions16 / last 28 16 16 → 16 28 7.645 → 6.634 9.030 → 11.665
tool-n1-text2-sessions1 / first 1 1 1 → 1 1 0.633 → 0.629 0.670 → 0.667
tool-n8-text8-sessions1 / first 8 1 1 → 1 8 1.124 → 1.087 1.244 → 1.252
tool-n8-text8-sessions8 / first 8 8 8 → 8 8 1.919 → 1.894 2.090 → 2.103
tool-n130-text30-sessions1 / first 100 1 1 → 1 36 10.736 → 9.090 11.442 → 10.402
tool-n130-text30-sessions1 / middle 94 1 1 → 1 36 10.344 → 8.587 11.014 → 9.136
tool-n130-text30-sessions1 / last 22 1 1 → 1 22 5.228 → 4.524 5.849 → 5.516
tool-n130-text30-sessions16 / first 100 16 16 → 16 36 12.334 → 10.661 12.932 → 12.778
tool-n130-text30-sessions16 / middle 94 16 16 → 16 36 12.089 → 10.300 14.069 → 12.229
tool-n130-text30-sessions16 / last 22 16 16 → 16 22 6.784 → 6.114 7.287 → 10.468

Connection catalog coverage

Connection count, enabled models per connection, and UTF-8/escaped model-identifier length vary across datasets. Each dataset starts with a real start request and follows returned cursor/revision values to completion. Multi-page datasets measure first, available middle, and final pages instead of constructing offsets manually.

Dataset Connections Models / connection Projected items Pages Items per page
connections1-models1-text0 1 1 8 1 8
connections1-models8-text0 1 8 22 1 22
connections2-models32-text0 2 32 140 2 128, 12
connections5-models128-text0 5 128 1310 11 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 30
connections5-models128-text18 5 128 1310 17 88, 81, 72, 84, 86, 72, 80, 88, 75, 76, 88, 79, 72, 87, 83, 72, 27
Path / dataset / position Admitted Cumulative encoding bytes Encoding reduction Median ms p95 ms
Connection catalog / connections1-models1-text0 / first 8 20,070 → 11,095 44.7% 0.707 → 0.691 1.144 → 0.999
Connection catalog / connections1-models8-text0 / first 22 64,325 → 19,997 68.9% 0.808 → 0.725 1.244 → 1.233
Connection catalog / connections2-models32-text0 / first 128 1,315,661 → 90,969 93.1% 3.869 → 1.424 4.925 → 1.927
Connection catalog / connections2-models32-text0 / last 12 25,519 → 10,959 57.1% 0.790 → 0.763 1.132 → 1.016
Connection catalog / connections5-models128-text0 / first 128 792,642 → 53,837 93.2% 3.976 → 2.468 4.449 → 2.802
Connection catalog / connections5-models128-text0 / middle 128 1,715,984 → 111,044 93.5% 6.007 → 2.904 6.559 → 3.307
Connection catalog / connections5-models128-text0 / last 30 119,734 → 27,024 77.4% 2.283 → 2.089 2.856 → 2.376
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Connection catalog / connections5-models128-text18 / middle 75 2,009,466 → 200,949 90.0% 16.135 → 11.305 17.245 → 13.412
Connection catalog / connections5-models128-text18 / last 27 313,821 → 74,807 76.2% 11.106 → 10.448 12.831 → 13.645

Correctness and acceptance conclusions

  • All 58 primary datasets complete pagination with deeply equal pages, expected item/identity checks, and complete page sequences.
  • All 102 real-query and 93 supplementary workloads validate returned/decoded results and transmitted byte counts between versions.
  • The existing 313 tests across 30 relevant files passed with no skips at 2026-09-10T05:50:18.185193+00:00 UTC, on the same production commit. Neither behavioral tests nor benchmarks were rerun for this documentation revision.
  • The 17 baseline behavior checks and three deliberate-defect checks remain tied to the same commit: test-validation.json. Focused tests retain UTF-8/JSON escape, byte-boundary, cursor, rejected-candidate state, and complete-pagination coverage.
  • The 10 Usage log datasets and 18 request workloads pass actual title-read set/count and returned-text assertions. Measurements cover all 16 query entry points and Connection workload variations. Workload boundaries are explicit: Usage buckets / LLM logs have empty canonical data, and Runtime Resource has an empty transcript. Conclusions apply to read paths, warm queries, and encoding work under these synthetic workloads. They do not establish performance acceptance for merging two populated Usage sources, substantial conversation history, Shell writes, unrelated table scans, UI performance, or cold startup.

Reproduction and artifacts

Artifacts are in the Git-ignored directory perf-results/page-assembly-5038/. The production commit is unchanged; reports and experiment data are not part of that commit. Earlier reports and data are archived separately and excluded from this review package. Timing tables retain the measurements listed above; this documentation revision updates report-related files and artifact hashes only. Attach the experiment artifacts or provide durable links when submitting the PR.

With dependencies installed and fixtures retained, run from a clean working tree at the optimized commit. These commands overwrite experiment results:

python3 perf-results/page-assembly-5038/prepare-run.py
node perf-results/page-assembly-5038/authority-cases.mjs > perf-results/page-assembly-5038/authority-benchmark.log 2>&1
MAKA_PAGE_CAPTURE=0 MAKA_PAGE_STORAGE=1 node --import ./perf-results/page-assembly-5038/capture.mjs ./perf-results/page-assembly-5038/measure.mjs > perf-results/page-assembly-5038/benchmark.log 2>&1
node perf-results/page-assembly-5038/check-serialization.mjs
python3 perf-results/page-assembly-5038/finalize-report.py

Temporary real storage requires owner-lock access. Run the two formal benchmarks sequentially to avoid contention. Retained regression logs correspond to the current commit. To repeat behavioral checks, use run-regression.mjs and test-validation.mjs; the latter includes expected failures from injected defects and does not modify production source.

Appendix A: all real-query workloads

Path / dataset / position Admitted Cumulative encoding bytes Encoding reduction Median ms p95 ms
Artifact / n1-text8 / first 1 3,455 → 3,459 -0.1% 0.917 → 0.916 1.178 → 1.321
Artifact / n8-text8 / first 8 33,065 → 20,693 37.4% 1.148 → 1.113 1.443 → 1.299
Artifact / n130-text80 / first 21 1,077,364 → 548,063 49.1% 8.851 → 7.440 10.797 → 8.384
Artifact / n130-text80 / middle 21 1,076,362 → 547,754 49.1% 8.749 → 7.367 9.245 → 9.098
Artifact / n130-text80 / last 4 366,401 → 352,251 3.9% 4.893 → 4.886 5.882 → 5.687
Plan / n1-text8 / first 1 3,645 → 3,649 -0.1% 0.646 → 0.651 0.707 → 0.703
Plan / n8-text8 / first 8 59,680 → 41,701 30.1% 1.232 → 1.162 1.342 → 1.340
Plan / n33-text180 / first 12 3,497,261 → 3,099,297 11.4% 20.095 → 19.048 22.136 → 20.772
Plan / n33-text180 / middle 12 3,498,600 → 3,099,670 11.4% 20.092 → 19.096 21.234 → 20.351
Plan / n33-text180 / last 9 3,218,189 → 3,033,597 5.7% 19.353 → 18.870 20.429 → 20.421
Session catalog / n1-text8 / first 1 6,564 → 6,568 -0.1% 0.516 → 0.516 0.579 → 0.559
Session catalog / n8-text8 / first 8 74,464 → 49,744 33.2% 1.096 → 0.998 1.500 → 1.330
Session catalog / n70-text30 / first 32 624,498 → 198,438 68.2% 3.823 → 2.436 4.372 → 2.877
Session catalog / n70-text30 / middle 32 624,498 → 198,438 68.2% 3.703 → 2.309 3.971 → 2.937
Session catalog / n70-text30 / last 6 50,809 → 37,408 26.4% 0.852 → 0.811 0.935 → 0.882
Runtime resource / n1-text8 / first 1 6,095 → 6,099 -0.1% 0.891 → 0.897 0.968 → 0.999
Runtime resource / n8-text8 / first 8 63,957 → 41,757 34.7% 1.312 → 1.238 1.552 → 1.595
Runtime resource / n70-text180 / first 10 1,277,926 → 988,814 22.6% 9.148 → 8.414 10.774 → 9.919
Runtime resource / n70-text180 / middle 10 1,278,043 → 988,853 22.6% 9.148 → 8.418 12.437 → 11.348
Runtime resource / n70-text180 / last 10 1,220,332 → 983,564 19.4% 8.921 → 8.292 10.805 → 10.140
Project catalog / n1-text8 / first 2 4,086 → 3,554 13.0% 0.160 → 0.158 0.215 → 0.196
Project catalog / n8-text8 / first 16 60,050 → 23,223 61.3% 0.483 → 0.377 0.572 → 0.467
Project catalog / n40-text60 / first 50 1,520,298 → 271,012 82.2% 5.463 → 2.204 6.580 → 2.595
Project catalog / n40-text60 / last 30 625,602 → 192,468 69.2% 2.954 → 1.825 3.766 → 2.190
Scheduled tasks / n1-text8 / first 1 3,717 → 3,721 -0.1% 0.324 → 0.323 0.350 → 0.347
Scheduled tasks / n8-text8 / first 8 51,814 → 27,591 46.7% 0.628 → 0.553 0.739 → 0.677
Scheduled tasks / n70-text180 / first 16 1,071,366 → 346,437 67.7% 6.403 → 4.277 8.094 → 5.934
Scheduled tasks / n70-text180 / middle 16 1,071,530 → 346,486 67.7% 6.436 → 4.312 8.321 → 6.060
Scheduled tasks / n70-text180 / last 6 208,264 → 128,128 38.5% 2.831 → 2.639 3.224 → 3.070
Connection catalog / connections1-models1-text0 / first 8 20,070 → 11,095 44.7% 0.707 → 0.691 1.144 → 0.999
Connection catalog / connections1-models8-text0 / first 22 64,325 → 19,997 68.9% 0.808 → 0.725 1.244 → 1.233
Connection catalog / connections2-models32-text0 / first 128 1,315,661 → 90,969 93.1% 3.869 → 1.424 4.925 → 1.927
Connection catalog / connections2-models32-text0 / last 12 25,519 → 10,959 57.1% 0.790 → 0.763 1.132 → 1.016
Connection catalog / connections5-models128-text0 / first 128 792,642 → 53,837 93.2% 3.976 → 2.468 4.449 → 2.802
Connection catalog / connections5-models128-text0 / middle 128 1,715,984 → 111,044 93.5% 6.007 → 2.904 6.559 → 3.307
Connection catalog / connections5-models128-text0 / last 30 119,734 → 27,024 77.4% 2.283 → 2.089 2.856 → 2.376
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Connection catalog / connections5-models128-text18 / middle 75 2,009,466 → 200,949 90.0% 16.135 → 11.305 17.245 → 13.412
Connection catalog / connections5-models128-text18 / last 27 313,821 → 74,807 76.2% 11.106 → 10.448 12.831 → 13.645
Pricing / pricing-n1-text2 / first 128 1,118,777 → 79,363 92.9% 5.864 → 1.657 6.648 → 2.000
Pricing / pricing-n1-text2 / middle 128 1,285,073 → 92,991 92.8% 4.799 → 1.558 5.070 → 1.964
Pricing / pricing-n1-text2 / last 19 37,353 → 13,146 64.8% 0.799 → 0.734 0.848 → 0.794
Pricing / pricing-n8-text8 / first 128 1,198,586 → 82,833 93.1% 5.920 → 1.706 7.974 → 2.290
Pricing / pricing-n8-text8 / middle 128 1,276,452 → 92,746 92.7% 4.834 → 1.595 5.903 → 2.110
Pricing / pricing-n8-text8 / last 26 63,202 → 17,842 71.8% 0.940 → 0.810 1.135 → 1.019
Pricing / pricing-n130-text30 / first 122 3,270,688 → 246,190 92.5% 8.100 → 2.310 8.983 → 2.596
Pricing / pricing-n130-text30 / middle 128 1,276,716 → 92,756 92.7% 5.164 → 1.965 5.484 → 2.309
Pricing / pricing-n130-text30 / last 26 63,262 → 17,852 71.8% 1.293 → 1.169 1.394 → 1.246
Usage buckets / buckets-n1-text2 / first 1 2,981 → 2,985 -0.1% 1.151 → 1.155 1.226 → 1.216
Usage buckets / buckets-n8-text8 / first 8 35,843 → 20,545 42.7% 1.459 → 1.434 2.047 → 1.991
Usage buckets / buckets-n130-text30 / first 42 1,283,238 → 241,966 81.1% 8.501 → 7.036 8.957 → 7.976
Usage buckets / buckets-n130-text30 / middle 42 1,281,344 → 241,680 81.1% 7.893 → 6.194 8.624 → 6.592
Usage buckets / buckets-n130-text30 / last 4 31,937 → 24,261 24.0% 5.502 → 5.501 6.393 → 6.556
Usage logs / llm-n1-text2-sessions1 / first 1 3,691 → 3,695 -0.1% 1.435 → 1.440 1.627 → 1.773
Usage logs / llm-n8-text8-sessions1 / first 8 49,483 → 28,550 42.3% 1.891 → 1.844 2.199 → 1.983
Usage logs / llm-n8-text8-sessions8 / first 8 49,483 → 28,550 42.3% 2.636 → 2.589 2.878 → 2.923
Usage logs / llm-n130-text30-sessions1 / first 34 1,104,631 → 245,560 77.8% 9.321 → 7.887 10.294 → 8.668
Usage logs / llm-n130-text30-sessions1 / middle 34 1,103,209 → 245,274 77.8% 8.706 → 7.132 9.397 → 7.901
Usage logs / llm-n130-text30-sessions1 / last 28 747,609 → 201,034 73.1% 6.093 → 5.074 7.140 → 5.558
Usage logs / llm-n130-text30-sessions16 / first 34 1,104,950 → 245,621 77.8% 10.856 → 9.265 14.488 → 13.040
Usage logs / llm-n130-text30-sessions16 / middle 34 1,103,565 → 245,345 77.8% 10.243 → 8.659 12.748 → 11.417
Usage logs / llm-n130-text30-sessions16 / last 28 747,777 → 201,074 73.1% 7.645 → 6.634 9.030 → 11.665
Usage logs / tool-n1-text2-sessions1 / first 1 2,711 → 2,715 -0.1% 0.633 → 0.629 0.670 → 0.667
Usage logs / tool-n8-text8-sessions1 / first 8 46,563 → 27,275 41.4% 1.124 → 1.087 1.244 → 1.252
Usage logs / tool-n8-text8-sessions8 / first 8 46,563 → 27,275 41.4% 1.919 → 1.894 2.090 → 2.103
Usage logs / tool-n130-text30-sessions1 / first 36 1,134,742 → 242,225 78.7% 10.736 → 9.090 11.442 → 10.402
Usage logs / tool-n130-text30-sessions1 / middle 36 1,132,407 → 241,789 78.6% 10.344 → 8.587 11.014 → 9.136
Usage logs / tool-n130-text30-sessions1 / last 22 456,481 → 147,017 67.8% 5.228 → 4.524 5.849 → 5.516
Usage logs / tool-n130-text30-sessions16 / first 36 1,135,098 → 242,296 78.7% 12.334 → 10.661 12.932 → 12.778
Usage logs / tool-n130-text30-sessions16 / middle 36 1,132,763 → 241,869 78.6% 12.089 → 10.300 14.069 → 12.229
Usage logs / tool-n130-text30-sessions16 / last 22 456,586 → 147,047 67.8% 6.784 → 6.114 7.287 → 10.468
Skill catalog / n1-text2 / first 1 5,386 → 5,390 -0.1% 1.959 → 1.971 2.125 → 2.358
Skill catalog / n8-text8 / first 8 54,011 → 33,344 38.3% 4.230 → 4.166 5.143 → 6.034
Skill catalog / n140-text30 / first 38 1,368,436 → 418,896 69.4% 48.278 → 45.091 53.358 → 54.501
Skill catalog / n140-text30 / middle 38 1,368,454 → 418,914 69.4% 48.312 → 45.878 52.631 → 49.002
Skill catalog / n140-text30 / last 26 772,760 → 355,089 54.0% 45.979 → 44.649 49.947 → 48.757
Invocable skills / n1-text2 / first 1 2,569 → 2,573 -0.2% 1.775 → 1.767 2.152 → 2.159
Invocable skills / n8-text8 / first 8 28,136 → 19,061 32.3% 3.840 → 3.826 4.889 → 4.803
Invocable skills / n140-text30 / first 56 1,806,492 → 418,956 76.8% 49.144 → 44.716 52.760 → 51.472
Invocable skills / n140-text30 / middle 56 1,806,542 → 419,006 76.8% 49.026 → 44.590 52.510 → 51.373
Invocable skills / n140-text30 / last 28 648,742 → 318,401 50.9% 45.068 → 43.969 48.366 → 48.514
Plugin platform / n1-text8 / first 1 2,265 → 2,269 -0.2% 0.062 → 0.062 0.065 → 0.071
Plugin platform / n8-text8 / first 8 25,939 → 15,954 38.5% 0.240 → 0.200 0.270 → 0.228
Plugin platform / n130-text80 / first 64 5,347,498 → 871,874 83.7% 18.579 → 4.679 24.210 → 6.011
Plugin platform / n130-text80 / middle 64 5,348,702 → 872,115 83.7% 18.374 → 4.590 24.160 → 5.823
Plugin platform / n130-text80 / last 2 309,283 → 307,024 0.7% 1.931 → 1.917 2.279 → 2.270
Plugin platform / n8-text0 / first 7 4,002,855 → 2,279,494 43.1% 6.433 → 4.127 11.249 → 4.907
Plugin platform / n8-text0 / last 1 738,991 → 738,995 -0.0% 1.733 → 1.734 1.823 → 1.822
External session catalog / n1-text8 / first 1 2,077 → 2,081 -0.2% 0.546 → 0.550 0.575 → 0.568
External session catalog / n8-text8 / first 8 27,872 → 15,073 45.9% 1.006 → 0.975 1.095 → 1.146
External session catalog / n40-text80 / first 16 83,806 → 29,735 64.5% 2.710 → 2.551 3.072 → 2.888
External session catalog / n40-text80 / middle 16 83,842 → 29,768 64.5% 2.767 → 2.615 3.851 → 3.559
External session catalog / n40-text80 / last 8 27,879 → 15,080 45.9% 2.528 → 2.494 2.899 → 3.080
Project directory / n1-text0 / first 1 540 → 544 -0.7% 0.261 → 0.267 0.315 → 0.317
Project directory / n8-text0 / first 8 2,563 → 1,307 49.0% 0.717 → 0.709 0.983 → 0.861
Project directory / n260-text10 / first 128 834,123 → 59,427 92.9% 11.323 → 9.169 13.147 → 10.892
Project directory / n260-text10 / middle 128 834,123 → 59,427 92.9% 11.337 → 9.248 13.621 → 11.091
Project directory / n260-text10 / last 4 3,083 → 2,271 26.3% 1.132 → 1.133 1.221 → 1.239
Memory / n1-text8 / first 1 1,989 → 1,993 -0.2% 1.157 → 1.157 1.801 → 2.330
Memory / n8-text8 / first 8 21,288 → 11,121 47.8% 1.300 → 1.266 2.673 → 1.897
Memory / n96-text30 / first 60 1,680,370 → 195,179 88.4% 7.607 → 3.453 8.051 → 3.984
Memory / n96-text30 / last 36 630,553 → 116,932 81.5% 4.176 → 2.804 5.048 → 3.671

Appendix B: serialization, parsing, and SQLite rows returned

Path / dataset / position JSON stringify calls JSON parse calls JSON parse bytes SQLite rows returned SQLite run calls
Artifact / n1-text8 / first 6 → 8 6 → 6 2,279 → 2,279 2 → 2 0 → 0
Artifact / n8-text8 / first 13 → 22 13 → 13 8,376 → 8,376 9 → 9 0 → 0
Artifact / n130-text80 / first 27 → 50 135 → 135 354,913 → 354,913 131 → 131 0 → 0
Artifact / n130-text80 / middle 27 → 50 135 → 135 354,850 → 354,850 131 → 131 0 → 0
Artifact / n130-text80 / last 9 → 14 135 → 135 316,214 → 316,214 131 → 131 0 → 0
Plan / n1-text8 / first 5 → 7 5 → 5 2,566 → 2,566 2 → 2 0 → 0
Plan / n8-text8 / first 47 → 56 12 → 12 12,590 → 12,590 9 → 9 0 → 0
Plan / n33-text180 / first 577 → 591 37 → 37 236,934 → 236,934 34 → 34 0 → 0
Plan / n33-text180 / middle 577 → 591 37 → 37 237,025 → 237,025 34 → 34 0 → 0
Plan / n33-text180 / last 573 → 583 37 → 37 221,781 → 221,781 34 → 34 0 → 0
Session catalog / n1-text8 / first 7 → 9 3 → 3 1,981 → 1,981 2 → 2 0 → 0
Session catalog / n8-text8 / first 42 → 51 10 → 10 13,153 → 13,153 9 → 9 0 → 0
Session catalog / n70-text30 / first 164 → 197 34 → 34 51,577 → 51,577 34 → 34 0 → 0
Session catalog / n70-text30 / middle 164 → 197 35 → 35 51,668 → 51,668 34 → 34 0 → 0
Session catalog / n70-text30 / last 32 → 39 9 → 9 10,052 → 10,052 7 → 7 0 → 0
Runtime resource / n1-text8 / first 7 → 9 5 → 5 2,648 → 2,648 2 → 2 0 → 0
Runtime resource / n8-text8 / first 21 → 30 12 → 12 12,448 → 12,448 9 → 9 0 → 0
Runtime resource / n70-text180 / first 86 → 98 74 → 74 412,536 → 412,536 71 → 71 0 → 0
Runtime resource / n70-text180 / middle 86 → 98 74 → 74 412,542 → 412,542 71 → 71 0 → 0
Runtime resource / n70-text180 / last 85 → 96 74 → 74 412,530 → 412,530 71 → 71 0 → 0
Project catalog / n1-text8 / first 6 → 9 1 → 1 811 → 811 2 → 2 0 → 0
Project catalog / n8-text8 / first 20 → 37 1 → 1 4,738 → 4,738 16 → 16 0 → 0
Project catalog / n40-text60 / first 55 → 107 1 → 1 48,181 → 48,181 80 → 80 0 → 0
Project catalog / n40-text60 / last 34 → 65 1 → 1 28,991 → 28,991 80 → 80 0 → 0
Scheduled tasks / n1-text8 / first 4 → 6 3 → 3 2,012 → 2,012 1 → 1 0 → 0
Scheduled tasks / n8-text8 / first 11 → 20 10 → 10 13,933 → 13,933 8 → 8 0 → 0
Scheduled tasks / n70-text180 / first 20 → 38 72 → 72 458,169 → 458,169 70 → 70 0 → 0
Scheduled tasks / n70-text180 / middle 20 → 38 72 → 72 458,179 → 458,179 70 → 70 0 → 0
Scheduled tasks / n70-text180 / last 9 → 16 72 → 72 404,929 → 404,929 70 → 70 0 → 0
Connection catalog / connections1-models1-text0 / first 11 → 20 3 → 3 3,283 → 3,283 0 → 0 0 → 0
Connection catalog / connections1-models8-text0 / first 25 → 48 3 → 3 5,457 → 5,457 0 → 0 0 → 0
Connection catalog / connections2-models32-text0 / first 131 → 260 3 → 3 23,171 → 23,171 0 → 0 0 → 0
Connection catalog / connections2-models32-text0 / last 15 → 28 3 → 3 4,884 → 4,884 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / first 131 → 260 3 → 3 27,972 → 27,972 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / middle 131 → 260 3 → 3 42,360 → 42,360 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / last 33 → 64 3 → 3 22,782 → 22,782 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / first 92 → 182 3 → 3 364,673 → 364,673 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / middle 79 → 156 3 → 3 364,957 → 364,957 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / last 30 → 58 3 → 3 334,292 → 334,292 0 → 0 0 → 0
Pricing / pricing-n1-text2 / first 132 → 261 3 → 3 16,160 → 16,160 2 → 2 0 → 0
Pricing / pricing-n1-text2 / middle 132 → 261 3 → 3 18,864 → 18,864 2 → 2 0 → 0
Pricing / pricing-n1-text2 / last 23 → 43 3 → 3 2,935 → 2,935 2 → 2 0 → 0
Pricing / pricing-n8-text8 / first 132 → 261 10 → 10 17,895 → 17,895 9 → 9 0 → 0
Pricing / pricing-n8-text8 / middle 132 → 261 10 → 10 19,856 → 19,856 9 → 9 0 → 0
Pricing / pricing-n8-text8 / last 30 → 57 10 → 10 4,911 → 4,911 9 → 9 0 → 0
Pricing / pricing-n130-text30 / first 127 → 251 132 → 132 93,430 → 93,430 131 → 131 0 → 0
Pricing / pricing-n130-text30 / middle 132 → 261 132 → 132 62,800 → 62,800 131 → 131 0 → 0
Pricing / pricing-n130-text30 / last 30 → 57 132 → 132 47,855 → 47,855 131 → 131 0 → 0
Usage buckets / buckets-n1-text2 / first 5 → 7 5 → 5 1,546 → 1,546 5 → 5 0 → 0
Usage buckets / buckets-n8-text8 / first 12 → 21 12 → 12 9,193 → 9,193 12 → 12 0 → 0
Usage buckets / buckets-n130-text30 / first 47 → 91 134 → 134 208,423 → 208,423 134 → 134 0 → 0
Usage buckets / buckets-n130-text30 / middle 47 → 91 133 → 133 208,196 → 208,196 132 → 132 0 → 0
Usage buckets / buckets-n130-text30 / last 8 → 13 133 → 133 164,947 → 164,947 132 → 132 0 → 0
Usage logs / llm-n1-text2-sessions1 / first 5 → 7 7 → 7 2,569 → 2,569 6 → 6 0 → 0
Usage logs / llm-n8-text8-sessions1 / first 12 → 21 14 → 14 12,070 → 12,070 13 → 13 0 → 0
Usage logs / llm-n8-text8-sessions8 / first 12 → 21 28 → 28 18,370 → 18,370 20 → 20 0 → 0
Usage logs / llm-n130-text30-sessions1 / first 39 → 75 136 → 136 216,184 → 216,184 135 → 135 0 → 0
Usage logs / llm-n130-text30-sessions1 / middle 39 → 75 135 → 135 215,957 → 215,957 133 → 133 0 → 0
Usage logs / llm-n130-text30-sessions1 / last 32 → 61 135 → 135 207,390 → 207,390 133 → 133 0 → 0
Usage logs / llm-n130-text30-sessions16 / first 39 → 75 166 → 166 231,022 → 231,022 150 → 150 0 → 0
Usage logs / llm-n130-text30-sessions16 / middle 39 → 75 165 → 165 230,797 → 230,797 148 → 148 0 → 0
Usage logs / llm-n130-text30-sessions16 / last 32 → 61 165 → 165 222,224 → 222,224 148 → 148 0 → 0
Usage logs / tool-n1-text2-sessions1 / first 5 → 7 5 → 5 2,005 → 2,005 2 → 2 0 → 0
Usage logs / tool-n8-text8-sessions1 / first 12 → 21 12 → 12 11,031 → 11,031 9 → 9 0 → 0
Usage logs / tool-n8-text8-sessions8 / first 12 → 21 26 → 26 17,331 → 17,331 16 → 16 0 → 0
Usage logs / tool-n130-text30-sessions1 / first 41 → 79 134 → 134 196,479 → 196,479 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions1 / middle 41 → 79 134 → 134 196,390 → 196,390 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions1 / last 26 → 49 134 → 134 177,701 → 177,701 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions16 / first 41 → 79 164 → 164 211,319 → 211,319 146 → 146 0 → 0
Usage logs / tool-n130-text30-sessions16 / middle 41 → 79 164 → 164 211,232 → 211,232 146 → 146 0 → 0
Usage logs / tool-n130-text30-sessions16 / last 26 → 49 164 → 164 192,533 → 192,533 146 → 146 0 → 0
Skill catalog / n1-text2 / first 102 → 104 3 → 3 1,371 → 1,371 0 → 0 0 → 0
Skill catalog / n8-text8 / first 578 → 587 3 → 3 6,441 → 6,441 0 → 0 0 → 0
Skill catalog / n140-text30 / first 9,354 → 9,394 3 → 3 49,287 → 49,287 0 → 0 0 → 0
Skill catalog / n140-text30 / middle 9,354 → 9,394 4 → 4 49,326 → 49,326 0 → 0 0 → 0
Skill catalog / n140-text30 / last 9,326 → 9,353 4 → 4 33,989 → 33,989 0 → 0 0 → 0
Invocable skills / n1-text2 / first 101 → 103 3 → 3 695 → 695 0 → 0 0 → 0
Invocable skills / n8-text8 / first 577 → 586 3 → 3 2,902 → 2,902 0 → 0 0 → 0
Invocable skills / n140-text30 / first 9,389 → 9,447 3 → 3 49,047 → 49,047 0 → 0 0 → 0
Invocable skills / n140-text30 / middle 9,389 → 9,447 4 → 4 49,086 → 49,086 0 → 0 0 → 0
Invocable skills / n140-text30 / last 9,329 → 9,358 4 → 4 24,817 → 24,817 0 → 0 0 → 0
Plugin platform / n1-text8 / first 6 → 8 1 → 1 478 → 478 0 → 0 0 → 0
Plugin platform / n8-text8 / first 20 → 29 1 → 1 2,900 → 2,900 0 → 0 0 → 0
Plugin platform / n130-text80 / first 133 → 198 1 → 1 142,266 → 142,266 0 → 0 0 → 0
Plugin platform / n130-text80 / middle 133 → 198 2 → 2 142,402 → 142,402 0 → 0 0 → 0
Plugin platform / n130-text80 / last 8 → 11 2 → 2 4,670 → 4,670 0 → 0 0 → 0
Plugin platform / n8-text0 / first 21 → 30 1 → 1 431,024 → 431,024 0 → 0 0 → 0
Plugin platform / n8-text0 / last 6 → 8 2 → 2 61,766 → 61,766 0 → 0 0 → 0
External session catalog / n1-text8 / first 5 → 7 2 → 2 745 → 745 0 → 0 0 → 0
External session catalog / n8-text8 / first 19 → 28 2 → 2 3,895 → 3,895 0 → 0 0 → 0
External session catalog / n40-text80 / first 35 → 52 2 → 2 7,447 → 7,447 0 → 0 0 → 0
External session catalog / n40-text80 / middle 35 → 52 2 → 2 7,453 → 7,453 0 → 0 0 → 0
External session catalog / n40-text80 / last 19 → 28 2 → 2 3,895 → 3,895 0 → 0 0 → 0
Project directory / n1-text0 / first 4 → 6 1 → 1 197 → 197 0 → 0 0 → 0
Project directory / n8-text0 / first 11 → 20 1 → 1 365 → 365 0 → 0 0 → 0
Project directory / n260-text10 / first 131 → 260 1 → 1 12,285 → 12,285 0 → 0 0 → 0
Project directory / n260-text10 / middle 131 → 260 1 → 1 12,285 → 12,285 0 → 0 0 → 0
Project directory / n260-text10 / last 7 → 12 1 → 1 549 → 549 0 → 0 0 → 0
Memory / n1-text8 / first 4 → 6 4 → 4 1,885 → 1,885 0 → 0 0 → 0
Memory / n8-text8 / first 11 → 20 4 → 4 4,167 → 4,167 0 → 0 0 → 0
Memory / n96-text30 / first 64 → 126 4 → 4 49,967 → 49,967 0 → 0 0 → 0
Memory / n96-text30 / last 39 → 76 4 → 4 30,611 → 30,611 0 → 0 0 → 0

Appendix C: all supplementary workloads

These 93 workloads retain the earlier scope: 15 page builders start from captured or synthetic projections, followed by protocol validation, the outbound queue, and consumer decoding. Directory includes the filesystem authority; eight Memory authority cases additionally include real storage and Markdown parsing. Larger speedups here do not substitute for real-query results in Appendix A. Single-item encoding can increase by four bytes.

Function / workload Input / admitted Assembly encoding bytes Segment encoding bytes Segment stringify calls Median ms p95 ms
memory-projection.entriesPage / captured 101/64 1,861,466 → 49,219 2,008,999 → 196,752 67 → 132 2.449 → 0.511 2.743 → 0.594
memory-projection.entriesPage / prefix-1 1/1 281 → 285 1,201 → 1,205 4 → 6 0.021 → 0.021 0.033 → 0.038
memory-projection.entriesPage / prefix-8 8/8 5,839 → 1,188 9,468 → 4,817 11 → 20 0.061 → 0.049 0.092 → 0.054
memory-projection.entriesPage / prefix-32 32/32 73,158 → 4,328 86,141 → 17,311 35 → 68 0.339 → 0.162 0.371 → 0.193
memory-projection.entriesPage / prefix-64 64/64 643,580 → 33,636 744,391 → 134,447 67 → 132 1.427 → 0.423 1.769 → 0.506
memory-projection.entriesPage / normal-8 8/8 13,903 → 2,980 22,908 → 11,985 11 → 20 0.121 → 0.088 0.139 → 0.097
memory-projection.entriesPage / normal-64 64/64 746,803 → 22,910 815,436 → 91,543 67 → 132 2.727 → 0.586 3.022 → 0.639
artifact-coordinator.createPage / captured 128/27 1,238,718 → 98,240 1,385,716 → 245,238 32 → 61 3.491 → 2.478 3.807 → 2.863
artifact-coordinator.createPage / prefix-1 1/1 15,134 → 15,138 37,914 → 37,918 5 → 7 0.379 → 0.387 0.437 → 0.431
artifact-coordinator.createPage / prefix-8 8/8 290,654 → 89,822 425,439 → 224,607 12 → 21 2.397 → 2.270 2.569 → 2.643
artifact-coordinator.createPage / prefix-32 32/27 1,238,709 → 98,231 1,385,707 → 245,229 32 → 61 3.459 → 2.452 3.790 → 2.755
artifact-coordinator.createPage / prefix-128 128/27 1,238,709 → 98,231 1,385,707 → 245,229 32 → 61 3.414 → 2.428 3.732 → 2.749
artifact-coordinator.createPage / normal-8 8/8 21,528 → 7,616 33,004 → 19,092 12 → 21 0.226 → 0.188 0.253 → 0.194
artifact-coordinator.createPage / normal-128 128/107 2,738,766 → 98,292 2,885,113 → 244,639 112 → 221 9.961 → 2.396 12.306 → 3.088
plan-coordinator.fitPage / captured 2/2 1,742 → 1,171 5,312 → 4,741 5 → 8 0.072 → 0.071 0.102 → 0.102
plan-coordinator.fitPage / prefix-1 1/1 578 → 582 2,387 → 2,391 4 → 6 0.041 → 0.042 0.059 → 0.082
plan-coordinator.fitPage / normal-8 8/8 20,049 → 4,324 33,042 → 17,317 11 → 20 0.272 → 0.204 0.415 → 0.328
plan-coordinator.fitPage / normal-16 16/16 73,062 → 8,476 98,445 → 33,859 19 → 36 0.589 → 0.363 0.625 → 0.399
session-catalog-coordinator.page / captured 32/32 437,758 → 53,858 560,976 → 177,076 164 → 197 1.956 → 1.139 2.294 → 1.373
session-catalog-coordinator.page / prefix-1 1/1 1,662 → 1,666 5,969 → 5,973 7 → 9 0.043 → 0.044 0.059 → 0.051
session-catalog-coordinator.page / prefix-8 8/8 35,745 → 13,405 66,848 → 44,508 42 → 51 0.307 → 0.254 0.366 → 0.299
session-catalog-coordinator.page / prefix-32 32/32 437,553 → 53,653 560,528 → 176,628 162 → 195 1.746 → 0.912 2.127 → 1.032
session-catalog-coordinator.page / normal-8 8/8 45,680 → 17,040 85,783 → 57,143 42 → 51 0.462 → 0.368 0.526 → 0.407
session-catalog-coordinator.page / normal-32 32/32 564,025 → 68,294 723,110 → 227,379 162 → 195 2.863 → 1.348 3.291 → 1.656
runtime-resource-projection.createRuntimeResourcePage / captured 65/64 896,880 → 53,434 976,842 → 133,396 68 → 133 2.700 → 0.672 2.969 → 0.745
runtime-resource-projection.createRuntimeResourcePage / prefix-1 1/1 1,134 → 1,138 2,922 → 2,926 5 → 7 0.022 → 0.023 0.044 → 0.027
runtime-resource-projection.createRuntimeResourcePage / prefix-8 8/8 19,562 → 6,942 30,035 → 17,415 12 → 21 0.123 → 0.095 0.138 → 0.112
runtime-resource-projection.createRuntimeResourcePage / prefix-32 32/32 236,691 → 26,872 276,954 → 67,135 36 → 69 0.826 → 0.333 0.946 → 0.409
runtime-resource-projection.createRuntimeResourcePage / prefix-64 64/64 896,880 → 53,434 976,842 → 133,396 68 → 133 2.681 → 0.657 3.198 → 0.722
runtime-resource-projection.createRuntimeResourcePage / normal-8 8/8 29,953 → 10,714 46,084 → 26,845 12 → 21 0.220 → 0.159 0.272 → 0.176
runtime-resource-projection.createRuntimeResourcePage / normal-64 64/64 1,403,126 → 83,676 1,528,451 → 209,001 68 → 133 5.267 → 1.140 5.787 → 1.317
project-catalog-coordinator.createPage / captured 3/3 1,331 → 605 3,208 → 2,482 6 → 10 0.025 → 0.024 0.045 → 0.049
project-catalog-coordinator.createPage / prefix-1 1/1 334 → 338 1,422 → 1,426 4 → 6 0.015 → 0.015 0.017 → 0.019
project-catalog-coordinator.createPage / normal-8 8/8 15,329 → 3,300 25,261 → 13,232 11 → 20 0.123 → 0.083 0.150 → 0.102
project-catalog-coordinator.createPage / normal-64 64/64 824,593 → 25,415 900,372 → 101,194 67 → 132 2.580 → 0.519 2.753 → 0.626
runtime-policy-coordinator.catalogPage / captured 1310/110 2,963,946 → 56,068 3,111,416 → 203,538 114 → 226 4.123 → 0.607 4.658 → 0.844
scheduled-task-coordinator.createScheduledTaskPage / captured 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.420 → 0.952 3.835 → 1.029
scheduled-task-coordinator.createScheduledTaskPage / prefix-1 1/1 787 → 791 3,233 → 3,237 4 → 6 0.025 → 0.026 0.045 → 0.035
scheduled-task-coordinator.createScheduledTaskPage / prefix-8 8/8 26,757 → 5,922 44,554 → 23,719 11 → 20 0.162 → 0.126 0.229 → 0.187
scheduled-task-coordinator.createScheduledTaskPage / prefix-32 32/32 388,257 → 23,580 458,818 → 94,141 35 → 68 1.103 → 0.489 1.163 → 0.548
scheduled-task-coordinator.createScheduledTaskPage / prefix-64 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.386 → 0.949 3.670 → 1.030
scheduled-task-coordinator.createScheduledTaskPage / normal-8 8/8 26,757 → 5,922 44,554 → 23,719 11 → 20 0.169 → 0.135 0.196 → 0.176
scheduled-task-coordinator.createScheduledTaskPage / normal-64 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.447 → 0.998 3.829 → 1.059
usage-pricing-coordinator.createPricingPage / captured 1427/128 1,229,402 → 37,320 1,285,073 → 92,991 132 → 261 4.280 → 0.806 5.117 → 0.876
usage-pricing-coordinator.createPricingPage / prefix-1 1/1 406 → 410 1,093 → 1,097 5 → 7 0.016 → 0.016 0.019 → 0.026
usage-pricing-coordinator.createPricingPage / prefix-8 8/8 7,004 → 2,532 10,874 → 6,402 12 → 21 0.074 → 0.060 0.110 → 0.065
usage-pricing-coordinator.createPricingPage / prefix-32 32/32 78,713 → 8,632 91,700 → 21,619 36 → 69 0.402 → 0.198 0.551 → 0.259
usage-pricing-coordinator.createPricingPage / prefix-128 128/128 1,069,400 → 31,776 1,116,917 → 79,293 132 → 261 3.786 → 0.726 4.083 → 0.791
usage-pricing-coordinator.createPricingPage / normal-8 8/8 7,816 → 2,766 12,037 → 6,987 12 → 21 0.078 → 0.062 0.092 → 0.075
usage-pricing-coordinator.createPricingPage / normal-128 128/128 1,383,642 → 42,272 1,446,903 → 105,533 132 → 261 4.660 → 0.816 4.850 → 0.918
usage-pricing-coordinator.usagePage / captured 6/6 35,156 → 9,847 64,761 → 39,452 9 → 16 0.209 → 0.167 0.238 → 0.202
usage-pricing-coordinator.usagePage / prefix-1 1/1 2,545 → 2,549 10,256 → 10,260 4 → 6 0.037 → 0.039 0.053 → 0.056
usage-pricing-coordinator.usagePage / normal-8 8/8 18,531 → 3,905 30,310 → 15,684 11 → 20 0.152 → 0.108 0.158 → 0.115
usage-pricing-coordinator.usagePage / normal-100 100/100 2,315,188 → 45,671 2,451,995 → 182,478 103 → 204 7.273 → 0.972 7.662 → 1.129
usage-pricing-coordinator.usageLogPage / captured 6/6 109,997 → 31,226 203,739 → 124,968 9 → 16 0.646 → 0.470 0.984 → 0.647
usage-pricing-coordinator.usageLogPage / prefix-1 1/1 7,761 → 7,765 31,120 → 31,124 4 → 6 0.086 → 0.088 0.103 → 0.109
usage-pricing-coordinator.usageLogPage / normal-8 8/8 34,875 → 7,530 57,529 → 30,184 11 → 20 0.200 → 0.157 0.219 → 0.184
usage-pricing-coordinator.usageLogPage / normal-100 100/53 1,360,332 → 49,247 1,505,287 → 194,202 57 → 112 2.761 → 0.747 3.337 → 0.999
skill-catalog-repository.createPage / captured 140/96 2,442,758 → 58,436 2,590,377 → 206,055 200 → 298 5.832 → 1.036 6.206 → 1.356
skill-catalog-repository.createPage / prefix-1 1/1 654 → 658 3,133 → 3,137 6 → 8 0.026 → 0.027 0.037 → 0.032
skill-catalog-repository.createPage / prefix-8 8/8 20,081 → 4,852 33,252 → 18,023 20 → 29 0.128 → 0.097 0.134 → 0.118
skill-catalog-repository.createPage / prefix-32 32/32 276,391 → 19,292 326,270 → 69,171 68 → 101 0.857 → 0.344 0.993 → 0.395
skill-catalog-repository.createPage / prefix-128 128/96 2,442,758 → 58,436 2,590,377 → 206,055 200 → 298 5.754 → 1.008 6.017 → 1.084
skill-catalog-repository.createPage / normal-8 8/8 27,749 → 6,550 46,014 → 24,815 20 → 29 0.224 → 0.159 0.252 → 0.179
skill-catalog-repository.createPage / normal-128 128/67 1,712,736 → 55,628 1,859,281 → 202,173 142 → 211 5.988 → 1.183 6.520 → 1.277
skill-catalog-repository.createInvocablePage / captured 1/1 288 → 292 1,246 → 1,250 4 → 6 0.012 → 0.012 0.012 → 0.013
skill-catalog-repository.createInvocablePage / prefix-1 1/1 288 → 292 1,246 → 1,250 4 → 6 0.012 → 0.012 0.039 → 0.043
skill-catalog-repository.createInvocablePage / normal-8 8/8 12,851 → 3,244 20,817 → 11,210 18 → 27 0.106 → 0.076 0.125 → 0.094
skill-catalog-repository.createInvocablePage / normal-128 128/128 2,625,624 → 51,974 2,747,224 → 173,574 258 → 387 7.538 → 0.885 8.041 → 0.995
plugin-platform-coordinator.boundedPage / captured 12/7 2,958,703 → 1,233,830 4,252,737 → 2,527,864 21 → 30 7.190 → 4.876 11.945 → 6.322
plugin-platform-coordinator.boundedPage / prefix-1 1/1 123,495 → 123,499 308,495 → 308,499 6 → 8 0.452 → 0.451 0.573 → 0.511
plugin-platform-coordinator.boundedPage / prefix-8 8/7 2,712,331 → 987,458 4,006,365 → 2,281,492 21 → 30 6.411 → 4.131 7.936 → 4.990
plugin-platform-coordinator.boundedPage / normal-8 8/8 18,467 → 7,810 27,571 → 16,914 20 → 29 0.162 → 0.130 0.184 → 0.170
plugin-platform-coordinator.boundedPage / normal-64 64/64 812,179 → 62,123 883,605 → 133,549 132 → 197 2.945 → 0.775 3.222 → 0.891
external-session-coordinator.boundedCatalogPage / captured 16/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.697 → 0.556 0.835 → 0.620
external-session-coordinator.boundedCatalogPage / prefix-1 1/1 25,071 → 25,075 100,379 → 100,383 4 → 6 0.261 → 0.262 0.282 → 0.311
external-session-coordinator.boundedCatalogPage / prefix-8 8/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.690 → 0.549 0.861 → 0.595
external-session-coordinator.boundedCatalogPage / prefix-16 16/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.706 → 0.561 0.753 → 0.602
external-session-coordinator.boundedCatalogPage / normal-8 8/8 46,041 → 10,226 76,760 → 40,945 11 → 20 0.292 → 0.214 0.340 → 0.240
external-session-coordinator.boundedCatalogPage / normal-16 16/16 173,516 → 20,430 234,781 → 81,695 19 → 36 0.730 → 0.409 0.803 → 0.452
project-directory-authority.listContainedDirectoryPage / directories-1 1/1 387 → 391 1,205 → 1,209 4 → 6 0.282 → 0.285 0.324 → 0.368
project-directory-authority.listContainedDirectoryPage / directories-8 8/8 7,492 → 2,512 11,607 → 6,627 11 → 20 0.795 → 0.779 1.082 → 1.191
project-directory-authority.listContainedDirectoryPage / directories-32 32/32 90,256 → 9,784 105,675 → 25,203 35 → 68 2.700 → 2.440 3.189 → 3.012
project-directory-authority.listContainedDirectoryPage / directories-128 128/128 1,325,632 → 38,872 1,386,267 → 99,507 131 → 260 12.671 → 9.145 14.570 → 10.394
project-directory-authority.listContainedDirectoryPage / directories-130 130/128 1,325,632 → 38,872 1,386,696 → 99,936 131 → 260 13.033 → 9.407 16.387 → 11.417
memory-authority-query / ascii-8 8/8 19,879 → 4,308 32,868 → 17,297 11 → 20 1.325 → 1.295 2.119 → 2.182
memory-authority-query / ascii-32 32/32 279,078 → 16,808 329,501 → 67,231 35 → 68 1.930 → 1.562 3.787 → 2.465
memory-authority-query / ascii-64 64/64 1,090,598 → 33,480 1,190,941 → 133,823 67 → 132 3.354 → 1.938 4.348 → 2.963
memory-authority-query / ascii-96 96/64 1,090,596 → 33,478 1,190,933 → 133,815 67 → 132 3.687 → 2.243 5.724 → 4.360
memory-authority-query / utf8-escaped-8 8/8 42,919 → 9,428 71,268 → 37,777 11 → 20 1.492 → 1.402 2.339 → 3.044
memory-authority-query / utf8-escaped-32 32/32 616,998 → 37,288 728,861 → 149,151 35 → 68 3.828 → 2.235 6.555 → 2.548
memory-authority-query / utf8-escaped-64 64/42 1,103,416 → 50,057 1,250,073 → 196,714 46 → 90 5.982 → 3.139 9.504 → 5.023
memory-authority-query / utf8-escaped-96 96/42 1,103,416 → 50,057 1,250,073 → 196,714 46 → 90 6.479 → 3.666 9.627 → 7.026
中文版本 # Issue #5038:分页组装优化性能测试报告

结论与交付范围

本报告测量全部 16 个真实分页入口,并覆盖 Connection catalog 的规模、条目大小及页位置变化。Usage 的 LLM/tool 日志均关联真实 Session,通过实际 Session store 读取标题,覆盖共享和多个 Session,并核验每个请求负载的标题读取与返回文本。主实验包含 58 组数据集、102 个请求负载,另有 93 组组页/协议重放及 Memory 存储负载。合计 195 组负载、39,000 个正式耗时样本

本次说明修订明确两项负载边界:Usage buckets/LLM logs 的 canonical rows = 0,Runtime Resource 的 transcript messages = 0。这是报告说明修订,未修改被测脚本、夹具或原始样本,也未重跑性能实验;下列采样时间及全部性能数值保持原样。

生产代码范围保持为原 issue 的 5 个示例及后续确认的 11 个分页函数,共 13 个业务源码文件和一个公共预算工具。JsonArrayPageBudget 累计固定页头、条目 UTF-8 JSON 字节、逗号和候选游标,替代反复复制候选数组和整页编码;保留结果预算、投影、游标、revision、条数限制、报错及最终协议校验。

所有主实验数据集的完整翻页结果前后一致,并核对了预期条目或身份集合;每个请求负载均在正式采样前核对生产结果、消费者解码结果及传输字节数。多条目页面的重复编码减少成立,但真实查询中未改动的读取、扫描、解析和投影仍占时间,因此整体查询提速通常小于组页子链提速;小页及末页可能不提速。下文保留所有结果,不使用耗时阈值筛选样本。

版本、环境与采样

  • 基线提交: 30cf0beb0def57626df3fdbf8c7ab4d0d3436896.
  • 优化后分支与提交: perf/memory-pagination-5038 / 81bed5f8100512b00977a08d5a313c3c29f29c45.
  • 主实验采样时间(UTC): 2026-09-10T08:36:07.234Z2026-09-10T08:39:42.243Z.
  • 补充实验采样时间(UTC): 2026-09-10T08:40:12.466Z2026-09-10T08:40:55.775Z.
  • 报告重新核验时间(UTC,非采样时间): 2026-09-10T13:19:06.296469+00:00.
  • Node v24.18.0; darwin/x64; CPU Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz.
  • 源码文件清单摘要(SHA-256): 43c4a598860a60528965ff61fd031f9165b74148bc77881996d4a66909179f9a; source-manifest.json.
  • 前后源码均从明确提交构建,基线通过 git archive 提取。全部 29 个变更文件与提交内容核对;未变更的工作区依赖共用。构建和锁文件摘要见 build-manifest.json。采样前后确认 HEAD 不变、源码工作区干净。
  • 每个负载、每个版本预热 30 次、正式采样 100 次,交替 before/after 顺序。计数单独执行,计时期间不启用 JSON/SQLite 计数钩子。median 为排序后中间两个样本的平均值;p95 为第 95 个样本。原始样本全部保留。
  • 主结果为热查询:完整翻页验证已预热应用缓存。initialQueryMs 另记新建协调器/适配器的首次查询,但它只有一次观测,且共享已播种的存储、未清空 OS 缓存,不能当作冷进程或冷磁盘延迟对比。External Session 的正式结果包括每次目录/stat 检查,使用真实适配器自身的热摘要缓存。

主实验:实际数据链与负载边界

所有主实验使用合法输入经 decodeRequestFrame → 实际查询 handler → dispatchOperation 结果校验 → BoundedSerialOutboundWriter → 内存传输 → 生产 decodeHostFrame。没有使用暴露私有组页函数的加载器。测试数据通过真实存储 API 或合法文件格式播种,播种和清理均在计时外;不存在用预组装页面代替查询的 mock。固定的权限、Host 能力和未使用的执行回调按下表注明。

入口 生产者/读取来源 查询权威方 数据集 请求负载
Artifact SessionStore.probeSessionRemoval and ArtifactStore.listPage (real SQLite metadata and artifact files) HostArtifactCoordinator 3 5
Plan PlanStore.readState and execution Session store (SQLite) HostPlanCoordinator 3 5
Session catalog Execution SessionStore.listCatalogPage (SQLite) and SessionManager live-state projection HostSessionCatalogCoordinator 3 5
Runtime resource SQLite ShellRun store -> ShellRunProcessManager -> SessionManager (transcript messages = 0; no event/run history) HostRuntimeResourceCoordinator 3 5
Project catalog ProjectCatalog.list (real SQLite records and filesystem availability checks) HostProjectCatalogCoordinator 3 4
Scheduled tasks ScheduledTaskStore.list (real SQLite) HostScheduledTaskCoordinator 3 5
Connection catalog Runtime Policy ConnectionCatalog.getSnapshot (JSON file store) -> model-catalog resolution and cursor lookup HostRuntimePolicyCoordinator 5 10
Pricing Pricing store snapshot (SQLite) merged with bundled pricing HostUsagePricingCoordinator 3 9
Usage buckets Telemetry SQLite buckets and canonical runtime usage merge (no Session-title lookup in this production branch); canonical rows = 0 HostUsagePricingCoordinator 3 5
Usage logs / llm Telemetry SQLite LLM logs, canonical runtime usage merge and real execution SessionStore.readHeaderSnapshot title reads; canonical rows = 0 HostUsagePricingCoordinator 5 9
Usage logs / tool Telemetry SQLite tool logs and real execution SessionStore.readHeaderSnapshot title reads (no canonical LLM merge) HostUsagePricingCoordinator 5 9
Skill catalog Real Skill files, filesystem scan, metadata/lock parsing and workspace resolver SkillCatalogRepository through HostSkillCatalogCoordinator (fixed Read capability for new-session invocable queries) 3 5
Invocable skills Real Skill files, filesystem scan, metadata/lock parsing and workspace resolver SkillCatalogRepository through HostSkillCatalogCoordinator (fixed Read capability for new-session invocable queries) 3 5
Plugin platform Recovered HostPluginPlatform composition runtime: read lane, inspect and flatten actual entries HostPluginPlatformCoordinator 4 7
External session catalog Real Claude Code adapter directory/stat reads and cached transcript summaries; SQLite batch import lookup HostExternalSessionCoordinator 3 5
Project directory Real filesystem enumeration, realpath/stat and sort HostProjectDirectoryAuthority through HostProjectCatalogCoordinator 3 5
Memory Real Runtime Policy and Memory bundle reads plus Markdown parsing HostMemoryCoordinator 3 4

数据集名称中的 n 表示播种记录数,text 是夹具文本长度参数,不是字节数。一般文本包含中文、emoji、引号和反斜杠;字段专属长度限制仍由生产 API 校验。Connection 的模型数按每个连接计算;Pricing 还包含内置价格;Project catalog 的 project/location 投影会产生多于播种记录数的条目。具体字段和生成规则见 authority-cases.mjs,未提高生产条数或字节上限。

Runtime Resource 的三个数据集只播种持久化的已结束 ShellRun 记录(1/8/70 条),不启动子进程;Session 的事件、运行历史及 transcript 消息均为空,即 transcript messages = 0。真实 SessionManager 的消息读取/投影入口仍会执行,但没有非空历史消息的解析、遍历或继承资源补充负载。这里的查询耗时仅代表这种空历史场景,不代表包含大量会话历史的查询表现。

所有路径的下游消费者均为生产协议解码器。其他范围限制:Plugin 测量 entries 视图,其他视图共用组页函数;External Session 测量真实 Claude Code 文件适配器及零导入记录的 SQLite 批量查找;Usage logs 同时测量 LLM/tool 两个入口;Skill invocable 使用新 Session 上下文、实际目录解析及固定 Read 工具能力。它们限定负载,不替换数据读取或组页算法。

SQLite 指标为 StatementSync all/get/iterate 返回的行数,不是数据库内部扫描行数;JSON parse 指标包含存储与协议解析,serialize 指标包含实际请求校验、读取/投影、组页、最终编码和消费者解码中的序列化。SQL run 调用数单独记录,不等同于写入或 WAL 字节。未测峰值内存、RSS、GC、SQL 扫描/排序或 WAL 字节,不据此声称这些指标改善。

真实查询的代表性结果

每个入口选择最大普通数据集的首页;Usage logs 主表取 130 条日志、16 个 Session 的 LLM 分支,其他结果见专项与全量表;Plugin 的超大单条目边界场景另列于全量表。箭头均为 before → after,编码量为累计 UTF-8 字节,耗时为 ms。

路径/数据集/页位置 本页条目 累计编码字节 编码减少 median ms p95 ms
Artifact / n130-text80 / first 21 1,077,364 → 548,063 49.1% 8.851 → 7.440 10.797 → 8.384
Plan / n33-text180 / first 12 3,497,261 → 3,099,297 11.4% 20.095 → 19.048 22.136 → 20.772
Session catalog / n70-text30 / first 32 624,498 → 198,438 68.2% 3.823 → 2.436 4.372 → 2.877
Runtime resource / n70-text180 / first 10 1,277,926 → 988,814 22.6% 9.148 → 8.414 10.774 → 9.919
Project catalog / n40-text60 / first 50 1,520,298 → 271,012 82.2% 5.463 → 2.204 6.580 → 2.595
Scheduled tasks / n70-text180 / first 16 1,071,366 → 346,437 67.7% 6.403 → 4.277 8.094 → 5.934
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Pricing / pricing-n130-text30 / first 122 3,270,688 → 246,190 92.5% 8.100 → 2.310 8.983 → 2.596
Usage buckets / buckets-n130-text30 / first 42 1,283,238 → 241,966 81.1% 8.501 → 7.036 8.957 → 7.976
Usage logs / llm-n130-text30-sessions16 / first 34 1,104,950 → 245,621 77.8% 10.856 → 9.265 14.488 → 13.040
Skill catalog / n140-text30 / first 38 1,368,436 → 418,896 69.4% 48.278 → 45.091 53.358 → 54.501
Invocable skills / n140-text30 / first 56 1,806,492 → 418,956 76.8% 49.144 → 44.716 52.760 → 51.472
Plugin platform / n130-text80 / first 64 5,347,498 → 871,874 83.7% 18.579 → 4.679 24.210 → 6.011
External session catalog / n40-text80 / first 16 83,806 → 29,735 64.5% 2.710 → 2.551 3.072 → 2.888
Project directory / n260-text10 / first 128 834,123 → 59,427 92.9% 11.323 → 9.169 13.147 → 10.892
Memory / n96-text30 / first 60 1,680,370 → 195,179 88.4% 7.607 → 3.453 8.051 → 3.984

本次主实验有 10 / 102 个请求负载的 after median 高于 before。它们均保留在全量表;单次本机实验不能将小幅差异解释为稳定回归,也不能保证每个负载都会提速。组页重复编码的减少与整次查询耗时的变化分别评价。

Usage 日志:真实 Session 标题读取

LLM/tool 各包含五组数据:1 条日志/1 个 Session,8 条/1 个,8 条/8 个,130 条/1 个,130 条/16 个。日志按创建次序轮流关联 Session,查询按时间倒序。标题使用中文、emoji、引号和反斜杠,长度在 Session 的 80 个码点限制内,并低于 Usage 投影上限;使用播种的原文独立核对返回标题。

协调器接入与实际应用相同的 sessionStore.readHeaderSnapshot(sessionId).name 读取。标题解析发生在按字节组页之前,所以会对候选日志中的不同 Session 各读取一次;实际读取的 Session 数可能多于最终页面涉及的数量。专门的依赖探针只在独立计数轮启用,断言读取集合与次数准确、返回条目均带预期标题;预热和正式计时前恢复原始读取函数,计时仍包含真实存储读取。完整翻页另外核对全部日志身份、Session 关联和标题。

Usage buckets 按生产流程只读取分组并合并 canonical runtime usage,不读取 Session 标题。Tool 日志读取自己的 telemetry ledger 和 Session 标题,不执行 LLM canonical merge。报告已分别描述这些路径。旧的无标题 Usage 日志数据保存在历史目录,未混入本轮结果;由于负载增加了 Session 关联和标题,不能把新旧两轮耗时差当作代码变化的效果。

Usage buckets 和 LLM logs 的记录仅写入 telemetry,canonical 模型调用账本未播种记录,即所有相关数据集的 canonical rows = 0。真实 canonical 读取和 merge 入口执行,但负载是非空 telemetry 与空 canonical 的合并。未覆盖两个来源均非空时的日志按时间归并、canonical 记录投影或相同 key 分组聚合成本;这里不将日志 merge 描述为按 ID 去重。此限制不适用于不执行 canonical merge 的 tool logs。

数据集/页位置 候选日志 Session 总数 标题读取次数 带标题条目 median ms p95 ms
llm-n1-text2-sessions1 / first 1 1 1 → 1 1 1.435 → 1.440 1.627 → 1.773
llm-n8-text8-sessions1 / first 8 1 1 → 1 8 1.891 → 1.844 2.199 → 1.983
llm-n8-text8-sessions8 / first 8 8 8 → 8 8 2.636 → 2.589 2.878 → 2.923
llm-n130-text30-sessions1 / first 100 1 1 → 1 34 9.321 → 7.887 10.294 → 8.668
llm-n130-text30-sessions1 / middle 96 1 1 → 1 34 8.706 → 7.132 9.397 → 7.901
llm-n130-text30-sessions1 / last 28 1 1 → 1 28 6.093 → 5.074 7.140 → 5.558
llm-n130-text30-sessions16 / first 100 16 16 → 16 34 10.856 → 9.265 14.488 → 13.040
llm-n130-text30-sessions16 / middle 96 16 16 → 16 34 10.243 → 8.659 12.748 → 11.417
llm-n130-text30-sessions16 / last 28 16 16 → 16 28 7.645 → 6.634 9.030 → 11.665
tool-n1-text2-sessions1 / first 1 1 1 → 1 1 0.633 → 0.629 0.670 → 0.667
tool-n8-text8-sessions1 / first 8 1 1 → 1 8 1.124 → 1.087 1.244 → 1.252
tool-n8-text8-sessions8 / first 8 8 8 → 8 8 1.919 → 1.894 2.090 → 2.103
tool-n130-text30-sessions1 / first 100 1 1 → 1 36 10.736 → 9.090 11.442 → 10.402
tool-n130-text30-sessions1 / middle 94 1 1 → 1 36 10.344 → 8.587 11.014 → 9.136
tool-n130-text30-sessions1 / last 22 1 1 → 1 22 5.228 → 4.524 5.849 → 5.516
tool-n130-text30-sessions16 / first 100 16 16 → 16 36 12.334 → 10.661 12.932 → 12.778
tool-n130-text30-sessions16 / middle 94 16 16 → 16 36 12.089 → 10.300 14.069 → 12.229
tool-n130-text30-sessions16 / last 22 16 16 → 16 22 6.784 → 6.114 7.287 → 10.468

Connection catalog 专项

连接数、每个连接启用的模型数、模型标识中的 UTF-8/转义长度分别变化。每个数据集从 start 请求沿真实返回 cursor/revision 完整读取;有多页时测首页、可用的中间页和末页,而不是手工构造 offset。

数据集 连接数 每连接模型数 投影条目总数 总页数 每页条目
connections1-models1-text0 1 1 8 1 8
connections1-models8-text0 1 8 22 1 22
connections2-models32-text0 2 32 140 2 128, 12
connections5-models128-text0 5 128 1310 11 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 30
connections5-models128-text18 5 128 1310 17 88, 81, 72, 84, 86, 72, 80, 88, 75, 76, 88, 79, 72, 87, 83, 72, 27
路径/数据集/页位置 本页条目 累计编码字节 编码减少 median ms p95 ms
Connection catalog / connections1-models1-text0 / first 8 20,070 → 11,095 44.7% 0.707 → 0.691 1.144 → 0.999
Connection catalog / connections1-models8-text0 / first 22 64,325 → 19,997 68.9% 0.808 → 0.725 1.244 → 1.233
Connection catalog / connections2-models32-text0 / first 128 1,315,661 → 90,969 93.1% 3.869 → 1.424 4.925 → 1.927
Connection catalog / connections2-models32-text0 / last 12 25,519 → 10,959 57.1% 0.790 → 0.763 1.132 → 1.016
Connection catalog / connections5-models128-text0 / first 128 792,642 → 53,837 93.2% 3.976 → 2.468 4.449 → 2.802
Connection catalog / connections5-models128-text0 / middle 128 1,715,984 → 111,044 93.5% 6.007 → 2.904 6.559 → 3.307
Connection catalog / connections5-models128-text0 / last 30 119,734 → 27,024 77.4% 2.283 → 2.089 2.856 → 2.376
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Connection catalog / connections5-models128-text18 / middle 75 2,009,466 → 200,949 90.0% 16.135 → 11.305 17.245 → 13.412
Connection catalog / connections5-models128-text18 / last 27 313,821 → 74,807 76.2% 11.106 → 10.448 12.831 → 13.645

正确性与验收结论

  • 58 组主实验数据集均完成翻页,前后页面深度相等,预期条目/身份集合及页序列完整性通过。
  • 102 个真实查询负载和 93 个补充负载均校验前后返回结果、消费者解码及传输字节数。
  • 原有 30 个相关测试文件共 313 项通过、无跳过;其运行时间为 2026-09-10T05:50:18.185193+00:00 UTC,与当前生产提交一致。本次报告说明修订未重跑行为测试或性能实验。
  • 17 项原始实现行为对照及三种指定缺陷验证仍对应同一代码提交,见 test-validation.json。公共工具的 UTF-8/JSON 转义、边界预算、游标和拒绝候选状态测试及实际完整翻页测试保持有效。
  • Usage 日志的 10 组数据集、18 个请求负载均通过实际标题读取集合/次数和返回文本断言;测量覆盖全部 16 个查询入口及 Connection 的负载变化。负载边界为:Usage buckets/LLM logs 的 canonical 记录为空,Runtime Resource 的 transcript 消息为空。性能结论限定为这些合成负载下的读取路径、热查询和编码工作量,不外推为两个非空 Usage 来源合并、大量会话历史、Shell 写入、其他表扫描、完整 UI 或冷启动性能验收。

复现与文件

实验文件位于 Git 忽略目录 perf-results/page-assembly-5038/。源代码提交未变化,报告和实验数据不在该提交内。早期实验报告与数据另行归档,未包含在本次交付附件中。当前耗时表继续使用上述采样;本次说明修订只更新报告相关文件和文件摘要。正式交付 PR 时应上传实验附件或提供持久链接。

在优化后提交的干净工作区安装依赖并保留 fixtures 后,从仓库根目录执行;这些命令覆盖实验结果:

python3 perf-results/page-assembly-5038/prepare-run.py
node perf-results/page-assembly-5038/authority-cases.mjs > perf-results/page-assembly-5038/authority-benchmark.log 2>&1
MAKA_PAGE_CAPTURE=0 MAKA_PAGE_STORAGE=1 node --import ./perf-results/page-assembly-5038/capture.mjs ./perf-results/page-assembly-5038/measure.mjs > perf-results/page-assembly-5038/benchmark.log 2>&1
node perf-results/page-assembly-5038/check-serialization.mjs
python3 perf-results/page-assembly-5038/finalize-report.py

临时真实存储需要 owner-lock 权限。两组正式性能命令应顺序执行,避免彼此争用。保留的回归日志对应当前提交;如需重跑行为测试,可执行 run-regression.mjstest-validation.mjs,后者包含预期失败的缺陷注入,不修改生产源码。

附录 A:全部真实查询负载

路径/数据集/页位置 本页条目 累计编码字节 编码减少 median ms p95 ms
Artifact / n1-text8 / first 1 3,455 → 3,459 -0.1% 0.917 → 0.916 1.178 → 1.321
Artifact / n8-text8 / first 8 33,065 → 20,693 37.4% 1.148 → 1.113 1.443 → 1.299
Artifact / n130-text80 / first 21 1,077,364 → 548,063 49.1% 8.851 → 7.440 10.797 → 8.384
Artifact / n130-text80 / middle 21 1,076,362 → 547,754 49.1% 8.749 → 7.367 9.245 → 9.098
Artifact / n130-text80 / last 4 366,401 → 352,251 3.9% 4.893 → 4.886 5.882 → 5.687
Plan / n1-text8 / first 1 3,645 → 3,649 -0.1% 0.646 → 0.651 0.707 → 0.703
Plan / n8-text8 / first 8 59,680 → 41,701 30.1% 1.232 → 1.162 1.342 → 1.340
Plan / n33-text180 / first 12 3,497,261 → 3,099,297 11.4% 20.095 → 19.048 22.136 → 20.772
Plan / n33-text180 / middle 12 3,498,600 → 3,099,670 11.4% 20.092 → 19.096 21.234 → 20.351
Plan / n33-text180 / last 9 3,218,189 → 3,033,597 5.7% 19.353 → 18.870 20.429 → 20.421
Session catalog / n1-text8 / first 1 6,564 → 6,568 -0.1% 0.516 → 0.516 0.579 → 0.559
Session catalog / n8-text8 / first 8 74,464 → 49,744 33.2% 1.096 → 0.998 1.500 → 1.330
Session catalog / n70-text30 / first 32 624,498 → 198,438 68.2% 3.823 → 2.436 4.372 → 2.877
Session catalog / n70-text30 / middle 32 624,498 → 198,438 68.2% 3.703 → 2.309 3.971 → 2.937
Session catalog / n70-text30 / last 6 50,809 → 37,408 26.4% 0.852 → 0.811 0.935 → 0.882
Runtime resource / n1-text8 / first 1 6,095 → 6,099 -0.1% 0.891 → 0.897 0.968 → 0.999
Runtime resource / n8-text8 / first 8 63,957 → 41,757 34.7% 1.312 → 1.238 1.552 → 1.595
Runtime resource / n70-text180 / first 10 1,277,926 → 988,814 22.6% 9.148 → 8.414 10.774 → 9.919
Runtime resource / n70-text180 / middle 10 1,278,043 → 988,853 22.6% 9.148 → 8.418 12.437 → 11.348
Runtime resource / n70-text180 / last 10 1,220,332 → 983,564 19.4% 8.921 → 8.292 10.805 → 10.140
Project catalog / n1-text8 / first 2 4,086 → 3,554 13.0% 0.160 → 0.158 0.215 → 0.196
Project catalog / n8-text8 / first 16 60,050 → 23,223 61.3% 0.483 → 0.377 0.572 → 0.467
Project catalog / n40-text60 / first 50 1,520,298 → 271,012 82.2% 5.463 → 2.204 6.580 → 2.595
Project catalog / n40-text60 / last 30 625,602 → 192,468 69.2% 2.954 → 1.825 3.766 → 2.190
Scheduled tasks / n1-text8 / first 1 3,717 → 3,721 -0.1% 0.324 → 0.323 0.350 → 0.347
Scheduled tasks / n8-text8 / first 8 51,814 → 27,591 46.7% 0.628 → 0.553 0.739 → 0.677
Scheduled tasks / n70-text180 / first 16 1,071,366 → 346,437 67.7% 6.403 → 4.277 8.094 → 5.934
Scheduled tasks / n70-text180 / middle 16 1,071,530 → 346,486 67.7% 6.436 → 4.312 8.321 → 6.060
Scheduled tasks / n70-text180 / last 6 208,264 → 128,128 38.5% 2.831 → 2.639 3.224 → 3.070
Connection catalog / connections1-models1-text0 / first 8 20,070 → 11,095 44.7% 0.707 → 0.691 1.144 → 0.999
Connection catalog / connections1-models8-text0 / first 22 64,325 → 19,997 68.9% 0.808 → 0.725 1.244 → 1.233
Connection catalog / connections2-models32-text0 / first 128 1,315,661 → 90,969 93.1% 3.869 → 1.424 4.925 → 1.927
Connection catalog / connections2-models32-text0 / last 12 25,519 → 10,959 57.1% 0.790 → 0.763 1.132 → 1.016
Connection catalog / connections5-models128-text0 / first 128 792,642 → 53,837 93.2% 3.976 → 2.468 4.449 → 2.802
Connection catalog / connections5-models128-text0 / middle 128 1,715,984 → 111,044 93.5% 6.007 → 2.904 6.559 → 3.307
Connection catalog / connections5-models128-text0 / last 30 119,734 → 27,024 77.4% 2.283 → 2.089 2.856 → 2.376
Connection catalog / connections5-models128-text18 / first 88 2,354,396 → 200,710 91.5% 16.361 → 10.893 17.673 → 11.715
Connection catalog / connections5-models128-text18 / middle 75 2,009,466 → 200,949 90.0% 16.135 → 11.305 17.245 → 13.412
Connection catalog / connections5-models128-text18 / last 27 313,821 → 74,807 76.2% 11.106 → 10.448 12.831 → 13.645
Pricing / pricing-n1-text2 / first 128 1,118,777 → 79,363 92.9% 5.864 → 1.657 6.648 → 2.000
Pricing / pricing-n1-text2 / middle 128 1,285,073 → 92,991 92.8% 4.799 → 1.558 5.070 → 1.964
Pricing / pricing-n1-text2 / last 19 37,353 → 13,146 64.8% 0.799 → 0.734 0.848 → 0.794
Pricing / pricing-n8-text8 / first 128 1,198,586 → 82,833 93.1% 5.920 → 1.706 7.974 → 2.290
Pricing / pricing-n8-text8 / middle 128 1,276,452 → 92,746 92.7% 4.834 → 1.595 5.903 → 2.110
Pricing / pricing-n8-text8 / last 26 63,202 → 17,842 71.8% 0.940 → 0.810 1.135 → 1.019
Pricing / pricing-n130-text30 / first 122 3,270,688 → 246,190 92.5% 8.100 → 2.310 8.983 → 2.596
Pricing / pricing-n130-text30 / middle 128 1,276,716 → 92,756 92.7% 5.164 → 1.965 5.484 → 2.309
Pricing / pricing-n130-text30 / last 26 63,262 → 17,852 71.8% 1.293 → 1.169 1.394 → 1.246
Usage buckets / buckets-n1-text2 / first 1 2,981 → 2,985 -0.1% 1.151 → 1.155 1.226 → 1.216
Usage buckets / buckets-n8-text8 / first 8 35,843 → 20,545 42.7% 1.459 → 1.434 2.047 → 1.991
Usage buckets / buckets-n130-text30 / first 42 1,283,238 → 241,966 81.1% 8.501 → 7.036 8.957 → 7.976
Usage buckets / buckets-n130-text30 / middle 42 1,281,344 → 241,680 81.1% 7.893 → 6.194 8.624 → 6.592
Usage buckets / buckets-n130-text30 / last 4 31,937 → 24,261 24.0% 5.502 → 5.501 6.393 → 6.556
Usage logs / llm-n1-text2-sessions1 / first 1 3,691 → 3,695 -0.1% 1.435 → 1.440 1.627 → 1.773
Usage logs / llm-n8-text8-sessions1 / first 8 49,483 → 28,550 42.3% 1.891 → 1.844 2.199 → 1.983
Usage logs / llm-n8-text8-sessions8 / first 8 49,483 → 28,550 42.3% 2.636 → 2.589 2.878 → 2.923
Usage logs / llm-n130-text30-sessions1 / first 34 1,104,631 → 245,560 77.8% 9.321 → 7.887 10.294 → 8.668
Usage logs / llm-n130-text30-sessions1 / middle 34 1,103,209 → 245,274 77.8% 8.706 → 7.132 9.397 → 7.901
Usage logs / llm-n130-text30-sessions1 / last 28 747,609 → 201,034 73.1% 6.093 → 5.074 7.140 → 5.558
Usage logs / llm-n130-text30-sessions16 / first 34 1,104,950 → 245,621 77.8% 10.856 → 9.265 14.488 → 13.040
Usage logs / llm-n130-text30-sessions16 / middle 34 1,103,565 → 245,345 77.8% 10.243 → 8.659 12.748 → 11.417
Usage logs / llm-n130-text30-sessions16 / last 28 747,777 → 201,074 73.1% 7.645 → 6.634 9.030 → 11.665
Usage logs / tool-n1-text2-sessions1 / first 1 2,711 → 2,715 -0.1% 0.633 → 0.629 0.670 → 0.667
Usage logs / tool-n8-text8-sessions1 / first 8 46,563 → 27,275 41.4% 1.124 → 1.087 1.244 → 1.252
Usage logs / tool-n8-text8-sessions8 / first 8 46,563 → 27,275 41.4% 1.919 → 1.894 2.090 → 2.103
Usage logs / tool-n130-text30-sessions1 / first 36 1,134,742 → 242,225 78.7% 10.736 → 9.090 11.442 → 10.402
Usage logs / tool-n130-text30-sessions1 / middle 36 1,132,407 → 241,789 78.6% 10.344 → 8.587 11.014 → 9.136
Usage logs / tool-n130-text30-sessions1 / last 22 456,481 → 147,017 67.8% 5.228 → 4.524 5.849 → 5.516
Usage logs / tool-n130-text30-sessions16 / first 36 1,135,098 → 242,296 78.7% 12.334 → 10.661 12.932 → 12.778
Usage logs / tool-n130-text30-sessions16 / middle 36 1,132,763 → 241,869 78.6% 12.089 → 10.300 14.069 → 12.229
Usage logs / tool-n130-text30-sessions16 / last 22 456,586 → 147,047 67.8% 6.784 → 6.114 7.287 → 10.468
Skill catalog / n1-text2 / first 1 5,386 → 5,390 -0.1% 1.959 → 1.971 2.125 → 2.358
Skill catalog / n8-text8 / first 8 54,011 → 33,344 38.3% 4.230 → 4.166 5.143 → 6.034
Skill catalog / n140-text30 / first 38 1,368,436 → 418,896 69.4% 48.278 → 45.091 53.358 → 54.501
Skill catalog / n140-text30 / middle 38 1,368,454 → 418,914 69.4% 48.312 → 45.878 52.631 → 49.002
Skill catalog / n140-text30 / last 26 772,760 → 355,089 54.0% 45.979 → 44.649 49.947 → 48.757
Invocable skills / n1-text2 / first 1 2,569 → 2,573 -0.2% 1.775 → 1.767 2.152 → 2.159
Invocable skills / n8-text8 / first 8 28,136 → 19,061 32.3% 3.840 → 3.826 4.889 → 4.803
Invocable skills / n140-text30 / first 56 1,806,492 → 418,956 76.8% 49.144 → 44.716 52.760 → 51.472
Invocable skills / n140-text30 / middle 56 1,806,542 → 419,006 76.8% 49.026 → 44.590 52.510 → 51.373
Invocable skills / n140-text30 / last 28 648,742 → 318,401 50.9% 45.068 → 43.969 48.366 → 48.514
Plugin platform / n1-text8 / first 1 2,265 → 2,269 -0.2% 0.062 → 0.062 0.065 → 0.071
Plugin platform / n8-text8 / first 8 25,939 → 15,954 38.5% 0.240 → 0.200 0.270 → 0.228
Plugin platform / n130-text80 / first 64 5,347,498 → 871,874 83.7% 18.579 → 4.679 24.210 → 6.011
Plugin platform / n130-text80 / middle 64 5,348,702 → 872,115 83.7% 18.374 → 4.590 24.160 → 5.823
Plugin platform / n130-text80 / last 2 309,283 → 307,024 0.7% 1.931 → 1.917 2.279 → 2.270
Plugin platform / n8-text0 / first 7 4,002,855 → 2,279,494 43.1% 6.433 → 4.127 11.249 → 4.907
Plugin platform / n8-text0 / last 1 738,991 → 738,995 -0.0% 1.733 → 1.734 1.823 → 1.822
External session catalog / n1-text8 / first 1 2,077 → 2,081 -0.2% 0.546 → 0.550 0.575 → 0.568
External session catalog / n8-text8 / first 8 27,872 → 15,073 45.9% 1.006 → 0.975 1.095 → 1.146
External session catalog / n40-text80 / first 16 83,806 → 29,735 64.5% 2.710 → 2.551 3.072 → 2.888
External session catalog / n40-text80 / middle 16 83,842 → 29,768 64.5% 2.767 → 2.615 3.851 → 3.559
External session catalog / n40-text80 / last 8 27,879 → 15,080 45.9% 2.528 → 2.494 2.899 → 3.080
Project directory / n1-text0 / first 1 540 → 544 -0.7% 0.261 → 0.267 0.315 → 0.317
Project directory / n8-text0 / first 8 2,563 → 1,307 49.0% 0.717 → 0.709 0.983 → 0.861
Project directory / n260-text10 / first 128 834,123 → 59,427 92.9% 11.323 → 9.169 13.147 → 10.892
Project directory / n260-text10 / middle 128 834,123 → 59,427 92.9% 11.337 → 9.248 13.621 → 11.091
Project directory / n260-text10 / last 4 3,083 → 2,271 26.3% 1.132 → 1.133 1.221 → 1.239
Memory / n1-text8 / first 1 1,989 → 1,993 -0.2% 1.157 → 1.157 1.801 → 2.330
Memory / n8-text8 / first 8 21,288 → 11,121 47.8% 1.300 → 1.266 2.673 → 1.897
Memory / n96-text30 / first 60 1,680,370 → 195,179 88.4% 7.607 → 3.453 8.051 → 3.984
Memory / n96-text30 / last 36 630,553 → 116,932 81.5% 4.176 → 2.804 5.048 → 3.671

附录 B:真实查询编码、解析与 SQLite 返回行数

路径/数据集/页位置 JSON stringify 次数 JSON parse 次数 JSON parse 字节 SQLite 返回行数 SQLite run 调用
Artifact / n1-text8 / first 6 → 8 6 → 6 2,279 → 2,279 2 → 2 0 → 0
Artifact / n8-text8 / first 13 → 22 13 → 13 8,376 → 8,376 9 → 9 0 → 0
Artifact / n130-text80 / first 27 → 50 135 → 135 354,913 → 354,913 131 → 131 0 → 0
Artifact / n130-text80 / middle 27 → 50 135 → 135 354,850 → 354,850 131 → 131 0 → 0
Artifact / n130-text80 / last 9 → 14 135 → 135 316,214 → 316,214 131 → 131 0 → 0
Plan / n1-text8 / first 5 → 7 5 → 5 2,566 → 2,566 2 → 2 0 → 0
Plan / n8-text8 / first 47 → 56 12 → 12 12,590 → 12,590 9 → 9 0 → 0
Plan / n33-text180 / first 577 → 591 37 → 37 236,934 → 236,934 34 → 34 0 → 0
Plan / n33-text180 / middle 577 → 591 37 → 37 237,025 → 237,025 34 → 34 0 → 0
Plan / n33-text180 / last 573 → 583 37 → 37 221,781 → 221,781 34 → 34 0 → 0
Session catalog / n1-text8 / first 7 → 9 3 → 3 1,981 → 1,981 2 → 2 0 → 0
Session catalog / n8-text8 / first 42 → 51 10 → 10 13,153 → 13,153 9 → 9 0 → 0
Session catalog / n70-text30 / first 164 → 197 34 → 34 51,577 → 51,577 34 → 34 0 → 0
Session catalog / n70-text30 / middle 164 → 197 35 → 35 51,668 → 51,668 34 → 34 0 → 0
Session catalog / n70-text30 / last 32 → 39 9 → 9 10,052 → 10,052 7 → 7 0 → 0
Runtime resource / n1-text8 / first 7 → 9 5 → 5 2,648 → 2,648 2 → 2 0 → 0
Runtime resource / n8-text8 / first 21 → 30 12 → 12 12,448 → 12,448 9 → 9 0 → 0
Runtime resource / n70-text180 / first 86 → 98 74 → 74 412,536 → 412,536 71 → 71 0 → 0
Runtime resource / n70-text180 / middle 86 → 98 74 → 74 412,542 → 412,542 71 → 71 0 → 0
Runtime resource / n70-text180 / last 85 → 96 74 → 74 412,530 → 412,530 71 → 71 0 → 0
Project catalog / n1-text8 / first 6 → 9 1 → 1 811 → 811 2 → 2 0 → 0
Project catalog / n8-text8 / first 20 → 37 1 → 1 4,738 → 4,738 16 → 16 0 → 0
Project catalog / n40-text60 / first 55 → 107 1 → 1 48,181 → 48,181 80 → 80 0 → 0
Project catalog / n40-text60 / last 34 → 65 1 → 1 28,991 → 28,991 80 → 80 0 → 0
Scheduled tasks / n1-text8 / first 4 → 6 3 → 3 2,012 → 2,012 1 → 1 0 → 0
Scheduled tasks / n8-text8 / first 11 → 20 10 → 10 13,933 → 13,933 8 → 8 0 → 0
Scheduled tasks / n70-text180 / first 20 → 38 72 → 72 458,169 → 458,169 70 → 70 0 → 0
Scheduled tasks / n70-text180 / middle 20 → 38 72 → 72 458,179 → 458,179 70 → 70 0 → 0
Scheduled tasks / n70-text180 / last 9 → 16 72 → 72 404,929 → 404,929 70 → 70 0 → 0
Connection catalog / connections1-models1-text0 / first 11 → 20 3 → 3 3,283 → 3,283 0 → 0 0 → 0
Connection catalog / connections1-models8-text0 / first 25 → 48 3 → 3 5,457 → 5,457 0 → 0 0 → 0
Connection catalog / connections2-models32-text0 / first 131 → 260 3 → 3 23,171 → 23,171 0 → 0 0 → 0
Connection catalog / connections2-models32-text0 / last 15 → 28 3 → 3 4,884 → 4,884 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / first 131 → 260 3 → 3 27,972 → 27,972 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / middle 131 → 260 3 → 3 42,360 → 42,360 0 → 0 0 → 0
Connection catalog / connections5-models128-text0 / last 33 → 64 3 → 3 22,782 → 22,782 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / first 92 → 182 3 → 3 364,673 → 364,673 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / middle 79 → 156 3 → 3 364,957 → 364,957 0 → 0 0 → 0
Connection catalog / connections5-models128-text18 / last 30 → 58 3 → 3 334,292 → 334,292 0 → 0 0 → 0
Pricing / pricing-n1-text2 / first 132 → 261 3 → 3 16,160 → 16,160 2 → 2 0 → 0
Pricing / pricing-n1-text2 / middle 132 → 261 3 → 3 18,864 → 18,864 2 → 2 0 → 0
Pricing / pricing-n1-text2 / last 23 → 43 3 → 3 2,935 → 2,935 2 → 2 0 → 0
Pricing / pricing-n8-text8 / first 132 → 261 10 → 10 17,895 → 17,895 9 → 9 0 → 0
Pricing / pricing-n8-text8 / middle 132 → 261 10 → 10 19,856 → 19,856 9 → 9 0 → 0
Pricing / pricing-n8-text8 / last 30 → 57 10 → 10 4,911 → 4,911 9 → 9 0 → 0
Pricing / pricing-n130-text30 / first 127 → 251 132 → 132 93,430 → 93,430 131 → 131 0 → 0
Pricing / pricing-n130-text30 / middle 132 → 261 132 → 132 62,800 → 62,800 131 → 131 0 → 0
Pricing / pricing-n130-text30 / last 30 → 57 132 → 132 47,855 → 47,855 131 → 131 0 → 0
Usage buckets / buckets-n1-text2 / first 5 → 7 5 → 5 1,546 → 1,546 5 → 5 0 → 0
Usage buckets / buckets-n8-text8 / first 12 → 21 12 → 12 9,193 → 9,193 12 → 12 0 → 0
Usage buckets / buckets-n130-text30 / first 47 → 91 134 → 134 208,423 → 208,423 134 → 134 0 → 0
Usage buckets / buckets-n130-text30 / middle 47 → 91 133 → 133 208,196 → 208,196 132 → 132 0 → 0
Usage buckets / buckets-n130-text30 / last 8 → 13 133 → 133 164,947 → 164,947 132 → 132 0 → 0
Usage logs / llm-n1-text2-sessions1 / first 5 → 7 7 → 7 2,569 → 2,569 6 → 6 0 → 0
Usage logs / llm-n8-text8-sessions1 / first 12 → 21 14 → 14 12,070 → 12,070 13 → 13 0 → 0
Usage logs / llm-n8-text8-sessions8 / first 12 → 21 28 → 28 18,370 → 18,370 20 → 20 0 → 0
Usage logs / llm-n130-text30-sessions1 / first 39 → 75 136 → 136 216,184 → 216,184 135 → 135 0 → 0
Usage logs / llm-n130-text30-sessions1 / middle 39 → 75 135 → 135 215,957 → 215,957 133 → 133 0 → 0
Usage logs / llm-n130-text30-sessions1 / last 32 → 61 135 → 135 207,390 → 207,390 133 → 133 0 → 0
Usage logs / llm-n130-text30-sessions16 / first 39 → 75 166 → 166 231,022 → 231,022 150 → 150 0 → 0
Usage logs / llm-n130-text30-sessions16 / middle 39 → 75 165 → 165 230,797 → 230,797 148 → 148 0 → 0
Usage logs / llm-n130-text30-sessions16 / last 32 → 61 165 → 165 222,224 → 222,224 148 → 148 0 → 0
Usage logs / tool-n1-text2-sessions1 / first 5 → 7 5 → 5 2,005 → 2,005 2 → 2 0 → 0
Usage logs / tool-n8-text8-sessions1 / first 12 → 21 12 → 12 11,031 → 11,031 9 → 9 0 → 0
Usage logs / tool-n8-text8-sessions8 / first 12 → 21 26 → 26 17,331 → 17,331 16 → 16 0 → 0
Usage logs / tool-n130-text30-sessions1 / first 41 → 79 134 → 134 196,479 → 196,479 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions1 / middle 41 → 79 134 → 134 196,390 → 196,390 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions1 / last 26 → 49 134 → 134 177,701 → 177,701 131 → 131 0 → 0
Usage logs / tool-n130-text30-sessions16 / first 41 → 79 164 → 164 211,319 → 211,319 146 → 146 0 → 0
Usage logs / tool-n130-text30-sessions16 / middle 41 → 79 164 → 164 211,232 → 211,232 146 → 146 0 → 0
Usage logs / tool-n130-text30-sessions16 / last 26 → 49 164 → 164 192,533 → 192,533 146 → 146 0 → 0
Skill catalog / n1-text2 / first 102 → 104 3 → 3 1,371 → 1,371 0 → 0 0 → 0
Skill catalog / n8-text8 / first 578 → 587 3 → 3 6,441 → 6,441 0 → 0 0 → 0
Skill catalog / n140-text30 / first 9,354 → 9,394 3 → 3 49,287 → 49,287 0 → 0 0 → 0
Skill catalog / n140-text30 / middle 9,354 → 9,394 4 → 4 49,326 → 49,326 0 → 0 0 → 0
Skill catalog / n140-text30 / last 9,326 → 9,353 4 → 4 33,989 → 33,989 0 → 0 0 → 0
Invocable skills / n1-text2 / first 101 → 103 3 → 3 695 → 695 0 → 0 0 → 0
Invocable skills / n8-text8 / first 577 → 586 3 → 3 2,902 → 2,902 0 → 0 0 → 0
Invocable skills / n140-text30 / first 9,389 → 9,447 3 → 3 49,047 → 49,047 0 → 0 0 → 0
Invocable skills / n140-text30 / middle 9,389 → 9,447 4 → 4 49,086 → 49,086 0 → 0 0 → 0
Invocable skills / n140-text30 / last 9,329 → 9,358 4 → 4 24,817 → 24,817 0 → 0 0 → 0
Plugin platform / n1-text8 / first 6 → 8 1 → 1 478 → 478 0 → 0 0 → 0
Plugin platform / n8-text8 / first 20 → 29 1 → 1 2,900 → 2,900 0 → 0 0 → 0
Plugin platform / n130-text80 / first 133 → 198 1 → 1 142,266 → 142,266 0 → 0 0 → 0
Plugin platform / n130-text80 / middle 133 → 198 2 → 2 142,402 → 142,402 0 → 0 0 → 0
Plugin platform / n130-text80 / last 8 → 11 2 → 2 4,670 → 4,670 0 → 0 0 → 0
Plugin platform / n8-text0 / first 21 → 30 1 → 1 431,024 → 431,024 0 → 0 0 → 0
Plugin platform / n8-text0 / last 6 → 8 2 → 2 61,766 → 61,766 0 → 0 0 → 0
External session catalog / n1-text8 / first 5 → 7 2 → 2 745 → 745 0 → 0 0 → 0
External session catalog / n8-text8 / first 19 → 28 2 → 2 3,895 → 3,895 0 → 0 0 → 0
External session catalog / n40-text80 / first 35 → 52 2 → 2 7,447 → 7,447 0 → 0 0 → 0
External session catalog / n40-text80 / middle 35 → 52 2 → 2 7,453 → 7,453 0 → 0 0 → 0
External session catalog / n40-text80 / last 19 → 28 2 → 2 3,895 → 3,895 0 → 0 0 → 0
Project directory / n1-text0 / first 4 → 6 1 → 1 197 → 197 0 → 0 0 → 0
Project directory / n8-text0 / first 11 → 20 1 → 1 365 → 365 0 → 0 0 → 0
Project directory / n260-text10 / first 131 → 260 1 → 1 12,285 → 12,285 0 → 0 0 → 0
Project directory / n260-text10 / middle 131 → 260 1 → 1 12,285 → 12,285 0 → 0 0 → 0
Project directory / n260-text10 / last 7 → 12 1 → 1 549 → 549 0 → 0 0 → 0
Memory / n1-text8 / first 4 → 6 4 → 4 1,885 → 1,885 0 → 0 0 → 0
Memory / n8-text8 / first 11 → 20 4 → 4 4,167 → 4,167 0 → 0 0 → 0
Memory / n96-text30 / first 64 → 126 4 → 4 49,967 → 49,967 0 → 0 0 → 0
Memory / n96-text30 / last 39 → 76 4 → 4 30,611 → 30,611 0 → 0 0 → 0

附录 C:全部补充负载

这 93 组保留旧方案的测量范围:15 个组页函数从已捕获或合成投影开始,经协议验证、发送队列和消费者解码;目录包含实际 filesystem authority;Memory authority 的 8 组另含真实存储和 Markdown 解析。这里的较大提速不能替代附录 A 的真实查询结果。单条记录累计编码可能增加 4 字节。

函数/负载 输入/接纳 组页累计编码字节 子链累计编码字节 子链 stringify 次数 median ms p95 ms
memory-projection.entriesPage / captured 101/64 1,861,466 → 49,219 2,008,999 → 196,752 67 → 132 2.449 → 0.511 2.743 → 0.594
memory-projection.entriesPage / prefix-1 1/1 281 → 285 1,201 → 1,205 4 → 6 0.021 → 0.021 0.033 → 0.038
memory-projection.entriesPage / prefix-8 8/8 5,839 → 1,188 9,468 → 4,817 11 → 20 0.061 → 0.049 0.092 → 0.054
memory-projection.entriesPage / prefix-32 32/32 73,158 → 4,328 86,141 → 17,311 35 → 68 0.339 → 0.162 0.371 → 0.193
memory-projection.entriesPage / prefix-64 64/64 643,580 → 33,636 744,391 → 134,447 67 → 132 1.427 → 0.423 1.769 → 0.506
memory-projection.entriesPage / normal-8 8/8 13,903 → 2,980 22,908 → 11,985 11 → 20 0.121 → 0.088 0.139 → 0.097
memory-projection.entriesPage / normal-64 64/64 746,803 → 22,910 815,436 → 91,543 67 → 132 2.727 → 0.586 3.022 → 0.639
artifact-coordinator.createPage / captured 128/27 1,238,718 → 98,240 1,385,716 → 245,238 32 → 61 3.491 → 2.478 3.807 → 2.863
artifact-coordinator.createPage / prefix-1 1/1 15,134 → 15,138 37,914 → 37,918 5 → 7 0.379 → 0.387 0.437 → 0.431
artifact-coordinator.createPage / prefix-8 8/8 290,654 → 89,822 425,439 → 224,607 12 → 21 2.397 → 2.270 2.569 → 2.643
artifact-coordinator.createPage / prefix-32 32/27 1,238,709 → 98,231 1,385,707 → 245,229 32 → 61 3.459 → 2.452 3.790 → 2.755
artifact-coordinator.createPage / prefix-128 128/27 1,238,709 → 98,231 1,385,707 → 245,229 32 → 61 3.414 → 2.428 3.732 → 2.749
artifact-coordinator.createPage / normal-8 8/8 21,528 → 7,616 33,004 → 19,092 12 → 21 0.226 → 0.188 0.253 → 0.194
artifact-coordinator.createPage / normal-128 128/107 2,738,766 → 98,292 2,885,113 → 244,639 112 → 221 9.961 → 2.396 12.306 → 3.088
plan-coordinator.fitPage / captured 2/2 1,742 → 1,171 5,312 → 4,741 5 → 8 0.072 → 0.071 0.102 → 0.102
plan-coordinator.fitPage / prefix-1 1/1 578 → 582 2,387 → 2,391 4 → 6 0.041 → 0.042 0.059 → 0.082
plan-coordinator.fitPage / normal-8 8/8 20,049 → 4,324 33,042 → 17,317 11 → 20 0.272 → 0.204 0.415 → 0.328
plan-coordinator.fitPage / normal-16 16/16 73,062 → 8,476 98,445 → 33,859 19 → 36 0.589 → 0.363 0.625 → 0.399
session-catalog-coordinator.page / captured 32/32 437,758 → 53,858 560,976 → 177,076 164 → 197 1.956 → 1.139 2.294 → 1.373
session-catalog-coordinator.page / prefix-1 1/1 1,662 → 1,666 5,969 → 5,973 7 → 9 0.043 → 0.044 0.059 → 0.051
session-catalog-coordinator.page / prefix-8 8/8 35,745 → 13,405 66,848 → 44,508 42 → 51 0.307 → 0.254 0.366 → 0.299
session-catalog-coordinator.page / prefix-32 32/32 437,553 → 53,653 560,528 → 176,628 162 → 195 1.746 → 0.912 2.127 → 1.032
session-catalog-coordinator.page / normal-8 8/8 45,680 → 17,040 85,783 → 57,143 42 → 51 0.462 → 0.368 0.526 → 0.407
session-catalog-coordinator.page / normal-32 32/32 564,025 → 68,294 723,110 → 227,379 162 → 195 2.863 → 1.348 3.291 → 1.656
runtime-resource-projection.createRuntimeResourcePage / captured 65/64 896,880 → 53,434 976,842 → 133,396 68 → 133 2.700 → 0.672 2.969 → 0.745
runtime-resource-projection.createRuntimeResourcePage / prefix-1 1/1 1,134 → 1,138 2,922 → 2,926 5 → 7 0.022 → 0.023 0.044 → 0.027
runtime-resource-projection.createRuntimeResourcePage / prefix-8 8/8 19,562 → 6,942 30,035 → 17,415 12 → 21 0.123 → 0.095 0.138 → 0.112
runtime-resource-projection.createRuntimeResourcePage / prefix-32 32/32 236,691 → 26,872 276,954 → 67,135 36 → 69 0.826 → 0.333 0.946 → 0.409
runtime-resource-projection.createRuntimeResourcePage / prefix-64 64/64 896,880 → 53,434 976,842 → 133,396 68 → 133 2.681 → 0.657 3.198 → 0.722
runtime-resource-projection.createRuntimeResourcePage / normal-8 8/8 29,953 → 10,714 46,084 → 26,845 12 → 21 0.220 → 0.159 0.272 → 0.176
runtime-resource-projection.createRuntimeResourcePage / normal-64 64/64 1,403,126 → 83,676 1,528,451 → 209,001 68 → 133 5.267 → 1.140 5.787 → 1.317
project-catalog-coordinator.createPage / captured 3/3 1,331 → 605 3,208 → 2,482 6 → 10 0.025 → 0.024 0.045 → 0.049
project-catalog-coordinator.createPage / prefix-1 1/1 334 → 338 1,422 → 1,426 4 → 6 0.015 → 0.015 0.017 → 0.019
project-catalog-coordinator.createPage / normal-8 8/8 15,329 → 3,300 25,261 → 13,232 11 → 20 0.123 → 0.083 0.150 → 0.102
project-catalog-coordinator.createPage / normal-64 64/64 824,593 → 25,415 900,372 → 101,194 67 → 132 2.580 → 0.519 2.753 → 0.626
runtime-policy-coordinator.catalogPage / captured 1310/110 2,963,946 → 56,068 3,111,416 → 203,538 114 → 226 4.123 → 0.607 4.658 → 0.844
scheduled-task-coordinator.createScheduledTaskPage / captured 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.420 → 0.952 3.835 → 1.029
scheduled-task-coordinator.createScheduledTaskPage / prefix-1 1/1 787 → 791 3,233 → 3,237 4 → 6 0.025 → 0.026 0.045 → 0.035
scheduled-task-coordinator.createScheduledTaskPage / prefix-8 8/8 26,757 → 5,922 44,554 → 23,719 11 → 20 0.162 → 0.126 0.229 → 0.187
scheduled-task-coordinator.createScheduledTaskPage / prefix-32 32/32 388,257 → 23,580 458,818 → 94,141 35 → 68 1.103 → 0.489 1.163 → 0.548
scheduled-task-coordinator.createScheduledTaskPage / prefix-64 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.386 → 0.949 3.670 → 1.030
scheduled-task-coordinator.createScheduledTaskPage / normal-8 8/8 26,757 → 5,922 44,554 → 23,719 11 → 20 0.169 → 0.135 0.196 → 0.176
scheduled-task-coordinator.createScheduledTaskPage / normal-64 64/64 1,527,025 → 47,132 1,667,954 → 188,061 67 → 132 3.447 → 0.998 3.829 → 1.059
usage-pricing-coordinator.createPricingPage / captured 1427/128 1,229,402 → 37,320 1,285,073 → 92,991 132 → 261 4.280 → 0.806 5.117 → 0.876
usage-pricing-coordinator.createPricingPage / prefix-1 1/1 406 → 410 1,093 → 1,097 5 → 7 0.016 → 0.016 0.019 → 0.026
usage-pricing-coordinator.createPricingPage / prefix-8 8/8 7,004 → 2,532 10,874 → 6,402 12 → 21 0.074 → 0.060 0.110 → 0.065
usage-pricing-coordinator.createPricingPage / prefix-32 32/32 78,713 → 8,632 91,700 → 21,619 36 → 69 0.402 → 0.198 0.551 → 0.259
usage-pricing-coordinator.createPricingPage / prefix-128 128/128 1,069,400 → 31,776 1,116,917 → 79,293 132 → 261 3.786 → 0.726 4.083 → 0.791
usage-pricing-coordinator.createPricingPage / normal-8 8/8 7,816 → 2,766 12,037 → 6,987 12 → 21 0.078 → 0.062 0.092 → 0.075
usage-pricing-coordinator.createPricingPage / normal-128 128/128 1,383,642 → 42,272 1,446,903 → 105,533 132 → 261 4.660 → 0.816 4.850 → 0.918
usage-pricing-coordinator.usagePage / captured 6/6 35,156 → 9,847 64,761 → 39,452 9 → 16 0.209 → 0.167 0.238 → 0.202
usage-pricing-coordinator.usagePage / prefix-1 1/1 2,545 → 2,549 10,256 → 10,260 4 → 6 0.037 → 0.039 0.053 → 0.056
usage-pricing-coordinator.usagePage / normal-8 8/8 18,531 → 3,905 30,310 → 15,684 11 → 20 0.152 → 0.108 0.158 → 0.115
usage-pricing-coordinator.usagePage / normal-100 100/100 2,315,188 → 45,671 2,451,995 → 182,478 103 → 204 7.273 → 0.972 7.662 → 1.129
usage-pricing-coordinator.usageLogPage / captured 6/6 109,997 → 31,226 203,739 → 124,968 9 → 16 0.646 → 0.470 0.984 → 0.647
usage-pricing-coordinator.usageLogPage / prefix-1 1/1 7,761 → 7,765 31,120 → 31,124 4 → 6 0.086 → 0.088 0.103 → 0.109
usage-pricing-coordinator.usageLogPage / normal-8 8/8 34,875 → 7,530 57,529 → 30,184 11 → 20 0.200 → 0.157 0.219 → 0.184
usage-pricing-coordinator.usageLogPage / normal-100 100/53 1,360,332 → 49,247 1,505,287 → 194,202 57 → 112 2.761 → 0.747 3.337 → 0.999
skill-catalog-repository.createPage / captured 140/96 2,442,758 → 58,436 2,590,377 → 206,055 200 → 298 5.832 → 1.036 6.206 → 1.356
skill-catalog-repository.createPage / prefix-1 1/1 654 → 658 3,133 → 3,137 6 → 8 0.026 → 0.027 0.037 → 0.032
skill-catalog-repository.createPage / prefix-8 8/8 20,081 → 4,852 33,252 → 18,023 20 → 29 0.128 → 0.097 0.134 → 0.118
skill-catalog-repository.createPage / prefix-32 32/32 276,391 → 19,292 326,270 → 69,171 68 → 101 0.857 → 0.344 0.993 → 0.395
skill-catalog-repository.createPage / prefix-128 128/96 2,442,758 → 58,436 2,590,377 → 206,055 200 → 298 5.754 → 1.008 6.017 → 1.084
skill-catalog-repository.createPage / normal-8 8/8 27,749 → 6,550 46,014 → 24,815 20 → 29 0.224 → 0.159 0.252 → 0.179
skill-catalog-repository.createPage / normal-128 128/67 1,712,736 → 55,628 1,859,281 → 202,173 142 → 211 5.988 → 1.183 6.520 → 1.277
skill-catalog-repository.createInvocablePage / captured 1/1 288 → 292 1,246 → 1,250 4 → 6 0.012 → 0.012 0.012 → 0.013
skill-catalog-repository.createInvocablePage / prefix-1 1/1 288 → 292 1,246 → 1,250 4 → 6 0.012 → 0.012 0.039 → 0.043
skill-catalog-repository.createInvocablePage / normal-8 8/8 12,851 → 3,244 20,817 → 11,210 18 → 27 0.106 → 0.076 0.125 → 0.094
skill-catalog-repository.createInvocablePage / normal-128 128/128 2,625,624 → 51,974 2,747,224 → 173,574 258 → 387 7.538 → 0.885 8.041 → 0.995
plugin-platform-coordinator.boundedPage / captured 12/7 2,958,703 → 1,233,830 4,252,737 → 2,527,864 21 → 30 7.190 → 4.876 11.945 → 6.322
plugin-platform-coordinator.boundedPage / prefix-1 1/1 123,495 → 123,499 308,495 → 308,499 6 → 8 0.452 → 0.451 0.573 → 0.511
plugin-platform-coordinator.boundedPage / prefix-8 8/7 2,712,331 → 987,458 4,006,365 → 2,281,492 21 → 30 6.411 → 4.131 7.936 → 4.990
plugin-platform-coordinator.boundedPage / normal-8 8/8 18,467 → 7,810 27,571 → 16,914 20 → 29 0.162 → 0.130 0.184 → 0.170
plugin-platform-coordinator.boundedPage / normal-64 64/64 812,179 → 62,123 883,605 → 133,549 132 → 197 2.945 → 0.775 3.222 → 0.891
external-session-coordinator.boundedCatalogPage / captured 16/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.697 → 0.556 0.835 → 0.620
external-session-coordinator.boundedCatalogPage / prefix-1 1/1 25,071 → 25,075 100,379 → 100,383 4 → 6 0.261 → 0.262 0.282 → 0.311
external-session-coordinator.boundedCatalogPage / prefix-8 8/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.690 → 0.549 0.861 → 0.595
external-session-coordinator.boundedCatalogPage / prefix-16 16/2 150,327 → 75,156 300,749 → 225,578 6 → 10 0.706 → 0.561 0.753 → 0.602
external-session-coordinator.boundedCatalogPage / normal-8 8/8 46,041 → 10,226 76,760 → 40,945 11 → 20 0.292 → 0.214 0.340 → 0.240
external-session-coordinator.boundedCatalogPage / normal-16 16/16 173,516 → 20,430 234,781 → 81,695 19 → 36 0.730 → 0.409 0.803 → 0.452
project-directory-authority.listContainedDirectoryPage / directories-1 1/1 387 → 391 1,205 → 1,209 4 → 6 0.282 → 0.285 0.324 → 0.368
project-directory-authority.listContainedDirectoryPage / directories-8 8/8 7,492 → 2,512 11,607 → 6,627 11 → 20 0.795 → 0.779 1.082 → 1.191
project-directory-authority.listContainedDirectoryPage / directories-32 32/32 90,256 → 9,784 105,675 → 25,203 35 → 68 2.700 → 2.440 3.189 → 3.012
project-directory-authority.listContainedDirectoryPage / directories-128 128/128 1,325,632 → 38,872 1,386,267 → 99,507 131 → 260 12.671 → 9.145 14.570 → 10.394
project-directory-authority.listContainedDirectoryPage / directories-130 130/128 1,325,632 → 38,872 1,386,696 → 99,936 131 → 260 13.033 → 9.407 16.387 → 11.417
memory-authority-query / ascii-8 8/8 19,879 → 4,308 32,868 → 17,297 11 → 20 1.325 → 1.295 2.119 → 2.182
memory-authority-query / ascii-32 32/32 279,078 → 16,808 329,501 → 67,231 35 → 68 1.930 → 1.562 3.787 → 2.465
memory-authority-query / ascii-64 64/64 1,090,598 → 33,480 1,190,941 → 133,823 67 → 132 3.354 → 1.938 4.348 → 2.963
memory-authority-query / ascii-96 96/64 1,090,596 → 33,478 1,190,933 → 133,815 67 → 132 3.687 → 2.243 5.724 → 4.360
memory-authority-query / utf8-escaped-8 8/8 42,919 → 9,428 71,268 → 37,777 11 → 20 1.492 → 1.402 2.339 → 3.044
memory-authority-query / utf8-escaped-32 32/32 616,998 → 37,288 728,861 → 149,151 35 → 68 3.828 → 2.235 6.555 → 2.548
memory-authority-query / utf8-escaped-64 64/42 1,103,416 → 50,057 1,250,073 → 196,714 46 → 90 5.982 → 3.139 9.504 → 5.023
memory-authority-query / utf8-escaped-96 96/42 1,103,416 → 50,057 1,250,073 → 196,714 46 → 90 6.479 → 3.666 9.627 → 7.026

@chinawch007

Copy link
Copy Markdown
Contributor Author

这是个简短人看版,16处代码优化代表性场景性能前后对此。单独测被优化函数的前后性能差距很明显,但这里实际展示出来的有的优化效果不明显。原因很好理解,如果某个查询原来大量时间都花在重复组页编码上,改善就大;如果多数时间花在读文件、扫描和解析上,组页即使省下很多工作,整次查询改善也有限。


每项取最大普通数据集的首页,耗时为热查询中位数(median),按耗时减少比例降序排列。

入口 累计编码量减少 耗时:优化前 → 后(ms) 耗时减少
Plugin platform 83.7% 18.579 → 4.679 74.8%
Pricing 92.5% 8.100 → 2.310 71.5%
Project catalog 82.2% 5.463 → 2.204 59.7%
Memory 88.4% 7.607 → 3.453 54.6%
Session catalog 68.2% 3.823 → 2.436 36.3%
Connection catalog 91.5% 16.361 → 10.893 33.4%
Scheduled tasks 67.7% 6.403 → 4.277 33.2%
Project directory 92.9% 11.323 → 9.169 19.0%
Usage buckets 81.1% 8.501 → 7.036 17.2%
Artifact 49.1% 8.851 → 7.440 15.9%
Usage logs(LLM) 77.8% 10.856 → 9.265 14.7%
Invocable skills 76.8% 49.144 → 44.716 9.0%
Runtime resource 22.6% 9.148 → 8.414 8.0%
Skill catalog 69.4% 48.278 → 45.091 6.6%
External session catalog 64.5% 2.710 → 2.551 5.9%
Plan 11.4% 20.095 → 19.048 5.2%

注:这是代表性场景对比,不是各入口所有负载的平均提升。完整 102 个请求负载中,92 个 median 改善,10 个未改善。

Replace repeated candidate-page copies and full-page serialization with a
shared incremental UTF-8 JSON budget across 16 pagination builders.
Preserve projection, cursor reservation, limits and protocol validation.

Cover exact byte boundaries, escaped Unicode and complete pagination in
shared budget tests and existing coordinator and protocol test suites.

Refs apache#5038

Generated-by: OpenAI Codex
Account for the two pagination coverage cases; require 93 passing tests and zero skips.

Refs apache#5038

Generated-by: OpenAI Codex
Expect 93 passing Skill catalog tests in the workflow policy checks, matching the Windows gate after pagination coverage was added.

Refs apache#5038

Generated-by: OpenAI Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant