mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-14 14:22:39 +00:00
Every edit of a story composed it from its first paragraph, so a typed character in a long threaded story cost as much as laying out the whole story: 456 ms in a story threaded over 300 pages. A composition that lays every paragraph once keeps its state before each paragraph. After an edit, composing starts one paragraph above the first changed one, in the kept state and with the lines above copied. It stops at the first unchanged paragraph it reaches in the state kept for that paragraph, and copies the lines from there on with their story offsets moved by the length of the edit. - The cache does this when only the story differs from its entry. - Composed whole as before: stories with footnotes, endnotes, tables, anchored objects, named lists, tracked deletions, balanced columns, vertical justification other than Top, column rules, type on a path, spanning or split paragraphs, paragraph borders or shading, and a layout that goes back over a paragraph (keep options). - An edit that moves lines into other frames is composed to the end of the story. In a 240-paragraph story a typed character composes 3 paragraphs (240 before). Docs: docs/architecture.md, docs/gaps.md (gap 20), ROADMAP. Refs #2298