aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/menu.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-12 01:22:16 +0000
committerBlaž Hrastnik2022-01-23 07:04:12 +0000
commit11c3ba935041437d11e1105dfa37480f2d27a6c4 (patch)
tree4f498a51332cc86910917fd0d84fc91440852c1f /helix-term/src/ui/menu.rs
parent9d41113ae02665fd73a7e25b4aff9cc416cfe4ae (diff)
Speed up ensure_next_boundary during render
This code: let start = ensure_grapheme_boundary_next(text, text.byte_to_char(start)); let end = ensure_grapheme_boundary_next(text, text.byte_to_char(end)); Would convert byte to char index, but then internally immediately convert back to byte index, operate on it, then convert it to char index. This change reduces the amount of time spent in ensure_grapheme_boundary from 29% to 2%.
Diffstat (limited to 'helix-term/src/ui/menu.rs')
0 files changed, 0 insertions, 0 deletions