dnkl/foot
41
2.0k
Fork
You've already forked foot
243

Text reflow performance #3 #539

Manually merged
dnkl merged 3 commits from reflow-osc8-performance into master 2021年05月23日 10:30:50 +02:00
Owner
Copy link

This improves the text reflow performance when there are lots of OSC-8 URI ranges in the grid.

Since we know the following:

  • URI ranges are sorted
  • URI coordinates are unique
  • URI ranges don’t span multiple rows

We can optimize URI range reflowing by:

  • Checking if the first URI range’s start coordinate is on the current column. If so, keep a pointer to it.
  • Use this pointer as source when instantiating the reflowed URI range.
  • If we already have a non-NULL range pointer, check its end coordinate instead.
  • If it matches, close the last URI range we inserted on the new row, and free/remove the range from the old row.
  • When line breaking, we only need to check if the last URI range is unclosed.

Part of #504

This improves the text reflow performance when there are lots of OSC-8 URI ranges in the grid. Since we know the following: * URI ranges are sorted * URI coordinates are unique * URI ranges don’t span multiple rows We can optimize URI range reflowing by: * Checking if the *first* URI range’s start coordinate is on the current column. If so, keep a pointer to it. * Use this pointer as source when instantiating the reflowed URI range. * If we already have a non-NULL range pointer, check its end coordinate instead. * If it matches, close the *last* URI range we inserted on the new row, and free/remove the range from the old row. * When line breaking, we only need to check if the *last* URI range is unclosed. Part of #504
dnkl force-pushed reflow-osc8-performance from 768fec16a7 to 9a849b25cc 2021年05月23日 10:29:49 +02:00 Compare
dnkl manually merged commit e335d57bc7 into master 2021年05月23日 10:30:50 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot!539
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "reflow-osc8-performance"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?