Versions 240 to 241
Lines 55–82 at 241 (were 55–60 at 240)
5656
58+
60+ * A file layout's bytes, less its lookup indexes, worked out once per layout (abso Capacity): a layout never changes
61+ * once made, and the view cache weighs every view it holds on every lookup, which summed every line's text again.
67+ // FileState and FileAttrs are per laid-out file; typed-array headers are separate from their payload byte lengths.
5981
Lines 1109–1115 at 241 (were 1087–1093 at 240)
1090− weight(): number {
10921114 n += 2 * ARRAY_HEADER_BYTES + this.#membershipSeq.byteLength + this.#membershipValue.byteLength;
Lines 1123–1131 at 241 (were 1101–1117 at 240)
1104− // FileState and FileAttrs are per laid-out file; typed-array
1105− // headers are separate from their payload byte lengths below.
1106− n += OBJECT_BYTES + OBJECT_BYTES + 2 * ARRAY_HEADER_BYTES;
1107− n += f.seq.byteLength + f.vis.byteLength;
1108− if (f.visText) for (const text of f.visText) n += REFERENCE_BYTES + 2 * (text?.length ?? 0);
1109− if (f.visWriter) n += 4 * f.visWriter.length;
1110− if (f.visK) n += 4 * f.visK.length;
1111− if (f.seqWriter) n += 4 * f.seqWriter.length;
1112− if (f.seqK) n += 4 * f.seqK.length;
1113− n += MAP_HEADER_BYTES + (MAP_ENTRY_BYTES + ARRAY_HEADER_BYTES) * f.deletedBy.size;
1114− for (const deleters of f.deletedBy.values()) n += REFERENCE_BYTES * deleters.length;
1126+ // A layout another view counted already (`seen`, across a cache's views) isn't counted again.
- MCP
- compare on this site's /mcp
- CLI
- abso diff 240 241 src/engine/view.ts --json
- JSON
- /christopher/abso-core/compare/240..241?file=src%2Fengine%2Fview.ts&format=json