perf(tui): bound the name scroll walk by the column width

Scrolled rows cost 31.7ms per frame at 30k results against 13.3ms on
develop, because every row segmented its whole filename into grapheme
clusters. Walk back from the end for at most one column of cells and
forward for at most the offset, so a row costs the column width rather
than the filename, and drop unicode-truncate for unicode-width. A tail
never starts on a combining mark.
This commit is contained in:
Michel de Graaf
2026-09-06 21:42:36 +02:00
parent 3193c73f5b
commit 06bc48fcd9
3 changed files with 41 additions and 8 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ soulseek-rs-lib = { version = "14.1.2", path = "../soulseek-rs-lib" }
clap = { version = "4.6.2", features = ["derive", "color", "wrap_help", "env"] }
clap_complete = "4.6.7"
ratatui = "0.30.2"
unicode-truncate = "2"
unicode-width = "0.2"
color-eyre = "0.6.5"
dotenv = "0.15.0"
igd-next = "0.17"