mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-12 21:23:02 +00:00
Layout looked up each paragraph's style with a reverse scan of every paragraph start, tab placement re-checked the whole rest of the line for every cluster, and PSD import found each character run's paragraph by summing paragraph lengths from the first one. Each was quadratic in counts a file controls. Use the existing binary search over run starts for paragraphs, one reverse scan for the line's last inked slot, and precomputed paragraph ends with a binary search on import.