{"version":317,"agent":"capacity","message":"A draft-state or land on a stored graph no longer reads a row per line to describe its collisions, or a row per claimant to pair them (abso 738).\n\n- View's line readers (lines, sequence and the uncached visible lines) name each line's writer with atomId, not graph.idOfSeq. The seq comes from the graph's own layout. idOfSeq's bounds check read the stored atom count once per line, and describing reads both sides' files in full. That was about 0.9 s of a warm draft-state on abso.\n- The claimant walk (orderedClaimants) and hasCommonResolver take each atom's seq from its id, as graph.atom itself does, instead of loading the stored atom to read it.\n\nOn abso's Oct 14 tables, both named drafts' states are identical by hash (codex-prose-authorship-610: 71db868585a419a4). codex-prose-authorship-610:\n- warm: 8,863 statements and 2.3 s become 7,820 and 0.92 s. Describing goes from 0.6 s to under 0.1 s, and pairing from 0.4 s to 0.1 s.\n- read cold after the other draft: 12,688 statements and 4.1 s become 11,645 and 2.25 s.\nWhat's left of the warm read is mostly the draft's own lines' uses (0.3 s, in proportion to the draft), the clash check and membership values.\n\nChecks: 1,450 tests pass, 0 fail, 2 skipped. tsc is clean and biome is clean.","time":1792226803138,"timeIso":"2026-10-17T08:46:43.138Z","changes":3,"change":5534,"files":["src/engine/view.ts","worker/project/collisions.ts"],"draft":null,"diff":[{"path":"src/engine/view.ts","added":11,"removed":9,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -10,7 +10,7 @@\n // made when a caller asks for them, and the latest asked for is kept.\n \n import type { Graph, RelocationInfo } from \"./graph.ts\";\n-import { isStartNode, lineId, seqOf } from \"./keys.ts\";\n+import { atomId, isStartNode, lineId, seqOf } from \"./keys.ts\";\n import { resolveScratchMoves, scratchLayoutNodes } from \"./relocation-scratch.ts\";\n import { isClosedSet, StableSet } from \"./state-source.ts\";\n import { joinLines } from \"./text.ts\";\n@@ -1112,7 +1112,7 @@\n \t\t\tyield {\n \t\t\t\tid: graph.lineIdOf(n),\n \t\t\t\ttext: graph.textOf(n),\n-\t\t\t\tatom: graph.idOfSeq(graph.writerSeqOf(n)),\n+\t\t\t\tatom: atomId(graph.writerSeqOf(n)),\n \t\t\t};\n \t}\n \n@@ -1126,12 +1126,12 @@\n \t\t\tconst n = vis[i]!;\n \t\t\tconst packed = visText?.[i];\n \t\t\tlines[i] = {\n-\t\t\t\tid: visWriter && visK ? lineId(graph.idOfSeq(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),\n+\t\t\t\tid: visWriter && visK ? lineId(atomId(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),\n \t\t\t\ttextChunks: () => graph.textChunks(n),\n \t\t\t\tget text() {\n \t\t\t\t\treturn packed ?? graph.textOf(n);\n \t\t\t\t},\n-\t\t\t\tatom: graph.idOfSeq(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),\n+\t\t\t\tatom: atomId(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),\n \t\t\t};\n \t\t}\n \t\treturn lines;\n@@ -1143,12 +1143,14 @@\n \t\tconst graph = this.graph;\n \t\tconst { vis, visText, visWriter, visK } = this.#file(path);\n \t\tconst lines: VisibleLine[] = new Array(vis.length);\n+\t\t// Writer seqs come from the graph's own layout, so they're named with atomId, not checked by idOfSeq (abso 738):\n+\t\t// on a stored graph its check read the atom count once a line, about 0.9 s of a warm draft-state on abso.\n \t\tfor (let i = 0; i < vis.length; i++) {\n \t\t\tconst n = vis[i]!;\n \t\t\tlines[i] = {\n-\t\t\t\tid: visWriter && visK ? lineId(graph.idOfSeq(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),\n+\t\t\t\tid: visWriter && visK ? lineId(atomId(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),\n \t\t\t\ttext: visText?.[i] ?? graph.textOf(n),\n-\t\t\t\tatom: graph.idOfSeq(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),\n+\t\t\t\tatom: atomId(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),\n \t\t\t};\n \t\t}\n \t\tthis.#linesCache = { path, lines };\n@@ -1170,13 +1172,13 @@\n \t\t\tconst writer = seqWriter ? seqWriter[i]! : graph.writerSeqOf(n);\n \t\t\tlet text: string | undefined;\n \t\t\tout[i] = {\n-\t\t\t\tid: seqWriter && seqK ? lineId(graph.idOfSeq(writer), seqK[i]!) : graph.lineIdOf(n),\n+\t\t\t\tid: seqWriter && seqK ? lineId(atomId(writer), seqK[i]!) : graph.lineIdOf(n),\n \t\t\t\tget text() {\n \t\t\t\t\ttext ??= graph.textOf(n);\n \t\t\t\t\treturn text;\n \t\t\t\t},\n-\t\t\t\tatom: graph.idOfSeq(writer),\n-\t\t\t\tdeletedBy: by ? by.map((s) => graph.idOfSeq(s)) : NONE,\n+\t\t\t\tatom: atomId(writer),\n+\t\t\t\tdeletedBy: by ? by.map((s) => atomId(s)) : NONE,\n \t\t\t\tvisible: by === undefined,\n \t\t\t};\n \t\t}"},{"path":"worker/project/collisions.ts","added":7,"removed":5,"diff":"--- a/worker/project/collisions.ts\n+++ b/worker/project/collisions.ts\n@@ -68,7 +68,7 @@\n \t\t}\n \t\tfor (const key of claimsOf(atom)) streams.push(g.eachWriterOf(key));\n \t\tconst theirs: AtomId[] = [];\n-\t\tfor (const id of orderedClaimants(g, streams)) if (against.has(id)) theirs.push(id);\n+\t\tfor (const id of orderedClaimants(streams)) if (against.has(id)) theirs.push(id);\n \t\tout.set(yours, theirs);\n \t}\n \treturn out;\n@@ -136,7 +136,7 @@\n \n /** Claim indexes append in canonical seq order. Merge one cursor per current\n  * atom key, retaining no candidate set proportional to historical claims. */\n-function* orderedClaimants(g: Graph, streams: IterableIterator<AtomId>[]): IterableIterator<AtomId> {\n+function* orderedClaimants(streams: IterableIterator<AtomId>[]): IterableIterator<AtomId> {\n \ttry {\n \t\ttype Head = { id: AtomId; seq: number; stream: number };\n \t\tconst heap: Head[] = [];\n@@ -152,9 +152,11 @@\n \t\t\t}\n \t\t\theap[at] = head;\n \t\t};\n+\t\t// Each claimant's seq from its id, as the graph reads it (abso 738): loading the stored atom for it read a row a\n+\t\t// claimant, most of a warm draft-state's pairing on abso.\n \t\tconst advance = (stream: number) => {\n \t\t\tconst next = streams[stream]!.next();\n-\t\t\tif (!next.done) push({ id: next.value, seq: g.atom(next.value).seq, stream });\n+\t\t\tif (!next.done) push({ id: next.value, seq: seqOf(next.value), stream });\n \t\t};\n \t\tfor (let stream = 0; stream < streams.length; stream++) advance(stream);\n \t\tlet previous = -1;\n@@ -190,8 +192,8 @@\n \t\tlet a = left.next();\n \t\tlet b = right.next();\n \t\twhile (!a.done && !b.done) {\n-\t\t\tconst x = g.atom(a.value).seq;\n-\t\t\tconst y = g.atom(b.value).seq;\n+\t\t\tconst x = seqOf(a.value);\n+\t\t\tconst y = seqOf(b.value);\n \t\t\tif (x === y && settled.has(a.value)) return true;\n \t\t\tif (x <= y) a = left.next();\n \t\t\tif (y <= x) b = right.next();"}],"ci":null}