diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-22 18:29:10 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-23 08:29:45 +0000 |
| commit | 9a849b25cc01df9ace9dd775f72655a972bf5ec0 (patch) | |
| tree | caac9feab11cdffc04f310ce376394b9998cec24 /spawn.c | |
| parent | grid: add grid_row_uri_range_destroy() (diff) | |
grid: reflow: uri-ranges: avoid looping URI ranges when reflowing
Since we know the following:
* URI ranges are sorted
* URI coordinates are unique
* URI ranges don’t cross 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.
Diffstat (limited to 'spawn.c')
0 files changed, 0 insertions, 0 deletions
