Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on reducing UI-thread work and repeated allocations in WinQuickLook by moving expensive operations off the hot path and reusing providers.
Changes:
- Ensure COM objects are always released when iterating shell windows, and stop searching once the foreground Explorer window is found.
- Avoid repeated sorting/enumeration by sorting preview handlers once at
MainWindowconstruction and deferring association recommendations until the user opens the menu. - Move directory entry counting off the UI thread and replace converter-based counting with an async-loaded bindable value; reuse thumbnail/property providers in the audio preview.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WinQuickLook.Core/Providers/ShellExplorerProvider.cs | Adds try/finally COM release and early continue/break logic while scanning shell windows. |
| WinQuickLook.Core/Providers/ShellAssociationProvider.cs | Removes alphabetical sorting of recommended association entries. |
| WinQuickLook.Core/Extensions/PreviewHandlerExtensions.cs | Removes per-call ordering; now iterates handlers as provided. |
| WinQuickLook.Core/Controls/GenericDirectoryControl.xaml.cs | Adds async directory item counting and exposes EntryCount for binding. |
| WinQuickLook.Core/Controls/GenericDirectoryControl.xaml | Switches from count converter to EntryCount binding; removes unused resource entry. |
| WinQuickLook.Core/Controls/AudioFileControl.xaml.cs | Reuses static shell providers and introduces a Thumbnail ref for binding. |
| WinQuickLook.Core/Controls/AudioFileControl.xaml | Binds thumbnail directly (removes converter/resource dictionary usage). |
| WinQuickLook.App/MainWindow.xaml.cs | Sorts handlers once; defers association recommendations; reuses monitor info for sizing/centering. |
| WinQuickLook.App/MainWindow.xaml | Updates associate-button visibility binding to use FileInfo rather than Recommends. |
| WinQuickLook.App/App.xaml.cs | Injects and reuses ShellExplorerProvider instead of creating it per preview action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Contributor
* Initial plan * Add CancellationToken support to GenericDirectoryControl to prevent concurrent directory enumerations Co-authored-by: shibayan <1356444+shibayan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shibayan <1356444+shibayan@users.noreply.github.com>
…#306) * Initial plan * Fix OpenAssociateMenu to cache empty recommends results using null sentinel Co-authored-by: shibayan <1356444+shibayan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shibayan <1356444+shibayan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.