Instead of walking the old grid cell-by-cell, and checking for tracking points, OSC-8 URIs etc on each cell, memcpy() sequences of cells.
For each row, find the end column, by scanning backwards, looking for the first non-empty cell.
Chunk the row based on tracking point coordinates. If there aren’t any tracking coordinates, or OSC-8 URIs on the current row, the entire row is copied in one go.
The chunk of cells is copied to the new grid. We may have to split it up into multiple copies, since not all cells may fit on the current “new” row.
Care must also be taken to not line break in the middle of a multi-column character.
On my laptop, average reflow time is reduced from 32599 µs to 22614 µs, for a full 16K scrollback, with lots of OSC-8 URIs.
Without hyperlinks, the new average reflow time is 14553 µs.
Part of #504
I think this one's pretty much done. Since it's a fairly big change, I'll be running this as my daily driver for ~1 week or so before merging.
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?