grid: row_add_uri_range: ensure the URIs are sorted #537

Manually merged
dnkl merged 1 commits from sort-osc8-ranges into master 7 months ago
dnkl commented 7 months ago
Owner

Ensure that the URI ranges stored in rows' extra field are sorted. Note that OSC-8 URLs cannot overlap, thus it's enough to compare the new range's start column with the other range's end columns.

We assume that OSC-8 URIs are, in general, printed from left to right, and thus we search the existing URI ranges backwards. In most cases, we'll only have to compare against the last range and then we're done.

This is to enable further performance improvements in text reflow.

Ensure that the URI ranges stored in rows' `extra` field are sorted. Note that OSC-8 URLs cannot overlap, thus it's enough to compare the new range's start column with the other range's end columns. We assume that OSC-8 URIs are, in general, printed from left to right, and thus we search the existing URI ranges backwards. In most cases, we'll only have to compare against the last range and then we're done. This is to enable further performance improvements in text reflow.
dnkl added the
performance
label 7 months ago
dnkl force-pushed sort-osc8-ranges from cf900ac3e3 to 7272a5469e 7 months ago
dnkl merged commit e37a6db19c into master manually 7 months ago
The pull request has been manually merged as e37a6db19c.
Sign in to join this conversation.
Loading…
There is no content yet.