Forum graph optimization — 2026-10-24

Completed. The final Large qualification selects scoped application reads, cached topic visibility and degree-adaptive native graph leaves. Every operation preserves business results, visibility, cursors, bounded work and recovery. All gains, 28 costlier rows and space/first-growth tradeoffs remain explicit. Prior forum results are historical motivation, not fresh measurements for this round.

The source baseline is b2459957. Its 47 SDK files are formatting-only changes that commit the exact bytes already used by the prior qualified artifacts. The new harness pins PocketIC 6a9a75ad…, saves its actual explain output and profiles bounded executions on a fully populated canister.

Experiments

Layer Candidate Main tradeoff to measure
NyxusGraph Keep small adjacency arrays; promote hubs into bounded sorted chunks with compact separators. More vertex-directory bytes versus fewer distant probes and shifted/dirty regions.
NyxusGraph directory Lazily materialize fixed-size row chunks beneath a compact top directory. Cheaper empty-domain growth versus another indirection and chunk retention.
Minima PagedGraph Conservative directory bounds and root-height tags support one bounded prefix fetch per visited node. Extra metadata maintenance versus less copying/overfetch; preserve cheap first-read eligibility.
Forum Ordered secondary-tag membership, a scoped conversation reader and borrowed second-hop suggestions. Seek/buffer work versus repeated point lookups, copies and loans; preserve exact pagination and work budgets.

Source changes are isolated in separate worktrees. One owner builds with leased warm targets. PocketIC ownership is per instance; populated runs may proceed concurrently when disk headroom permits. Only same-artifact snapshots may restore a fixture. A changed representation needs a fresh compatible fixture and actual KEEP/trap checks.

Initial source attribution covers ten Small-fixture diagnostic queries. It separates heap/stable fees, flat inlined work and first-fault sites; it does not qualify an improvement or replace the large-fixture comparison.

Upgrade-screen eligibility records why these particular app-only variants also need fresh fixtures: their owner declarations capture the modified implementation sources. Platform-layout equality is insufficient.

AND-window Small comparison passes the full existing protocol and records its gains and regressions. It does not select the candidate for the large workload.

Combined application Small comparison adds scoped conversation readers and borrowed suggestions. All gains and four regressions remain explicit; the later cache candidate supplies the selected Large result.

Combined application Large comparison completes the exact 300,000-user workload, with all 14 gains and 12 regressions reported. It is the intermediate application result before the selected topic cache.

Static-page investigation identifies the recurring private-read fee difference in a static reservation; the dynamic heap page sets match. Two later H3 profiles locate the opening instruction in the page-pool configuration read; compiler specialization is a separate pending experiment.

Topic visibility Small comparison records the private cached fact beside existing topic metadata. The Large application comparison selects the five app changes after the exact 300,000-user run: all operation and lifecycle checks pass, with every gain, regression and unmeasured full-export limit retained.

The native Large comparison selects bounded hub leaves, retaining all 29 regressions and its directory-growth/space cost. The combined preview verifies Small integration; the final combined Large run completes integration. Native diagnostic pairs retain low/high-source mutation and query differences separately.

Allocator inlining passes correctness but is rejected as the default after complete RRT/RRts controls: small computation gains do not remove the static page fee, and Hylix instruction/page/capacity costs rise despite better latency. Its completed Large forum run remains separate negative experiment evidence in the final comparison; it is not in Main.

Alternative Small variants preserve the rejected lazy directory and isolated H3 slabs, and the unselected H1 prefix-read design. Each has a complete comparison; none has a Large qualification.

Matched Large source profiles separate API calls, bytes, first page charges and computation across 20 diagnostic requests. Their totals are diagnostic evidence rather than primary workload averages.

Setup accounting explains the unlogged real-canister work before the measured rows. The three declared population phases and separately measured growth setup do not price every initialization call.

Coverage

  • Network: follows, followers (ordinary and hub), following feed, people suggestions, follower counts in public profiles, insert/remove/no-op and mixed flows.
  • Taxonomy: vocabulary, per-topic tags, single/AND-tag browsing, related topics, replacements/no-ops and mixed knowledge flows.
  • Conversations: citations, backlinks (ordinary and hub), direct replies, ancestors, bounded context, reply-to and relation mutations/mixed flows.

Use at least 16 varied calls for reported scenario costs, with population in earlier calls and a prior warmup. Whole-call instructions include all metered fees; profiles distinguish computation, API/copy costs and observed page charges. Missing dirty/stable/source fields remain unavailable. Flat source attribution may be useful even when physical stack capture is partial. Preserve decoder, Store, projection and reply work instead of subtracting a body timer/no-op.

Primary research and IC adaptation

Terrace stores neighbors in degree-dependent structures. It motivates the native small-row/hub split; its CPU results do not predict IC instruction savings.

Aspen uses compressed tree chunks for locality and batch updates. Contiguous chunks and compact bounds are relevant; its concurrent snapshot machinery is not required by this actor workload.

LiveGraph emphasizes sequential adjacency scans. We investigate scan locality without importing its transaction log, timestamps or concurrency control: the IC already owns message rollback.

LLAMA combines CSR with multiversioned indirection. Its compact indexing is a candidate idea; this round does not assume that multiversioning or retained caches will earn their costs.

These papers motivated engineering hypotheses. The selected application/native combination passes the final Large suite. The extra SDK inlining option remains rejected after complete forum and RRT/RRts comparisons.