Text reflow performance #4 #540

Manually merged
dnkl merged 18 commits from chunked-reflow into master 6 months ago
dnkl commented 7 months ago
Owner

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

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
dnkl added the
performance
label 7 months ago
dnkl force-pushed chunked-reflow from ec9490ae77 to b7a73864da 6 months ago
dnkl force-pushed chunked-reflow from b7a73864da to 4e821e5894 6 months ago
dnkl force-pushed chunked-reflow from b000a496ae to 206d7f71b7 6 months ago
dnkl force-pushed chunked-reflow from 02086f9af1 to f72f5e41c9 6 months ago
Poster
Owner

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.

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.
dnkl changed title from WIP: text reflow performance #4 to Text reflow performance #4 6 months ago
dnkl force-pushed chunked-reflow from f72f5e41c9 to 0064ab0af5 6 months ago
dnkl force-pushed chunked-reflow from 0064ab0af5 to fb68a65d9d 6 months ago
dnkl force-pushed chunked-reflow from fb68a65d9d to cc911ad9b0 6 months ago
dnkl force-pushed chunked-reflow from e31873fd37 to dfb4688e50 6 months ago
dnkl added this to the 1.8.0 milestone 6 months ago
dnkl force-pushed chunked-reflow from dfb4688e50 to 925bbf3a6b 6 months ago
dnkl force-pushed chunked-reflow from 925bbf3a6b to ca0cbfdeeb 6 months ago
dnkl force-pushed chunked-reflow from 4ee9872cff to 3292bb5b8e 6 months ago
dnkl added 1 commit 6 months ago
dnkl merged commit dd43afd754 into master manually 6 months ago
The pull request has been manually merged as dd43afd754.
Sign in to join this conversation.
Loading…
There is no content yet.