Skip to content

Improve Start Menu responsiveness and cache resilience - #2574

Open
lellomele wants to merge 1 commit into
Open-Shell:masterfrom
lellomele:start-menu-responsiveness-and-cache
Open

lellomele wants to merge 1 commit into
Open-Shell:masterfrom
lellomele:start-menu-responsiveness-and-cache

Conversation

@lellomele

Copy link
Copy Markdown

Summary

  • Let the Start Menu accept input while shortcuts are still being preloaded. Resolve frequent programs from UserAssist in their existing order, then apply new-program highlighting when preload is ready. Update the open menu and Programs tree without rebuilding either list or moving the selection.
  • Allocate temporary icon image lists on first use and release retired bitmaps after the item workers have stopped.
  • Validate cached PIDLs, string lengths, bitmap dimensions and blacklist records. Replace the previous cache only after the temporary file has been written and flushed successfully.
  • Clear the disk cache without invalidating entries still referenced by the menu or its workers. Report whether the operation succeeded and rebuild the cache on the next launch.
  • Clean up partial search-worker initialization and allow item workers to exit promptly on shutdown.

This is based on 9dfa7fa. It keeps the index checks from #2549 and the cache writer's exclusion of temporary items and icons from #2550. Cache clearing also waits for an in-flight writer before deleting the file.

Validation

  • Built Setup|x64 for both master and this branch with MSVC v145. Both builds completed with zero errors and warnings.
  • Compared the two builds in Windows Sandbox with their DLLs loaded in Explorer. In two pairs per cache state, first keyboard input was 390–487 ms earlier with an empty cache and 181–224 ms earlier with a populated cache. All runs accepted six navigation keys, found the test shortcut through search, highlighted it and unloaded the DLL.
  • Repeated the comparison with the menu's accessibility provider enabled. All nine runs, including the warm-up, exposed the same three frequent entries in the same order from four seeded entries that shared one duplicate app ID.
  • Earlier Windows Sandbox tests on the v4.4.198 development builds verified selection and frequent-program order, cache clearing through Settings, regeneration on restart, and preservation of a locked cache file. The focused startup comparison across six pairs per cache state measured median paired reductions of 261 ms with an empty cache and 110 ms with a populated cache. A separate warmed comparison of lazy icon lists measured a median reduction of 26 GDI objects.

Defer new-program highlighting until shortcuts are ready and allocate temporary icon lists on demand. Validate cached records, preserve the last complete cache on write failures, and leave live entries intact when clearing the disk cache. Make worker startup and shutdown tolerate partial initialization and cancellation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant