summaryrefslogtreecommitdiff
path: root/%25252525252525253fid%25252525252525253d77526f756e23e362081ac807521f901f2e5cd...
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-03-24 02:04:04 +0600
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-03-25 22:49:07 +0100
commit7269c5355d257dd2ad2c53f15dc9c1cf6796aea5 (patch)
treef043c06fb58bc7a161c9329c48ec98759d9cc401 /%25252525252525253fid%25252525252525253d77526f756e23e362081ac807521f901f2e5cd5e6%252525252525253fid%252525252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%2525252525253fid%2525252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%25252525253fid%25252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%252525253fid%252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5&id2%252525253d6be057f060543bb0f3ed9423904263617cdffffe%2525253fid%2525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%25253fid%25253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%253fid%253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%3fid%3d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5?id=7269c5355d257dd2ad2c53f15dc9c1cf6796aea5
parent6be057f060543bb0f3ed9423904263617cdffffe (diff)
significantly improve performance on large strings
this replaces inefficient pattern of `MIN(TEXTW(..), n)` with drw_fontset_getwidth_clamp() instead, which is far more efficient when we only want up to a certain width. dumping a decently sized (unicode) emoji file into dmenu, I see the startup time drop significantly with this patch. before -> after 360ms -> 160ms this should also noticeably improve input latency (responsiveness) given that calcoffsets() and drawmenu() are pretty hot functions.
Diffstat (limited to '%25252525252525253fid%25252525252525253d77526f756e23e362081ac807521f901f2e5cd5e6%252525252525253fid%252525252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%2525252525253fid%2525252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%25252525253fid%25252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%252525253fid%252525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5&id2%252525253d6be057f060543bb0f3ed9423904263617cdffffe%2525253fid%2525253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%25253fid%25253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%253fid%253d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5%3fid%3d7269c5355d257dd2ad2c53f15dc9c1cf6796aea5?id=7269c5355d257dd2ad2c53f15dc9c1cf6796aea5')
0 files changed, 0 insertions, 0 deletions