Files
craft-libs/crates
David Mann 2d52fc0a0b Menus: assign a level's mnemonics once, not once per row and pass
Every row of a menu level asks for its letter in every pass, and
`MenuLevel::mnemonic_of` assigned the letters of all the level's rows for
each of them; `end` did once more. A long menu (PhotoCraft's Filter menu,
about twenty rows) and each submenu it opened paid that many full
assignments per frame: in a profile of hovering the Filter menu's submenu
rows, `mnemonic::assign` was about 6 % of the open menus' cost, and the
frame that opens a submenu reached 12.7 ms of UI work.

The level keeps the last assignment with the labels and folder it was made
for and assigns again only when they change. `mnemonic_of` reads its entry
with `get`, so a row that is not in the list gets none instead of an
index out of range.

Part of storytold/photocraft#15493.
2026-11-17 22:45:22 +01:00
..
2026-11-16 21:59:19 +01:00
…
2026-11-17 01:37:58 +00:00
…
…
…
2026-11-15 11:38:06 +00:00
…
…
2026-11-16 16:48:00 +00:00
2026-11-17 08:27:05 +00:00
…
…
…