CmdPal: Separate in-flight icon loads from cached results - #49738
Conversation
|
This might low key fix #47620. I'm trying to stand up a feature regression test in run to actually confirm that... |
Mike Griese (zadjii-msft)
left a comment
There was a problem hiding this comment.
This makes sense to me, and looks like it's way more async, which is what we want.
I'm just weirded out about these shims in the cmdpal.ui.unitests, but whatever that's not worth blocking on.
|
|
||
| namespace Microsoft.CmdPal.UI.ViewModels; | ||
|
|
||
| internal sealed class IconDataViewModel |
There was a problem hiding this comment.
These are... fake view models? but in the Microsoft.CmdPal.UI.ViewModels namespace?
There was a problem hiding this comment.
Oh squirrel, I'm pretty sure I hid them inside the test class (bandit), puzzling.
As for why: it builds much faster. The exe is self-contained, so the test project has to be too. I gave up on solving that problem in this PR, leaving us with a great conversation starter :)
- Remove the provider-wide lock from the XAML icon request path. - Deduplicate concurrent loads with an identity-safe in-flight dictionary. - Cache successful results before atomically retiring their in-flight tasks. - Report queue rejection through TryEnqueueLoad and fault rejected requests. - Add tests for concurrent loading, caching, failures, and retries.
2b6739d to
9981c06
Compare
Summary of the Pull Request
This PR is stacked on #49737 and separates in-flight icon loading from completed-result caching. The XAML request path no longer takes a provider-wide lock, while concurrent requests for the same icon still share a single task and completion cleanup can retire only that exact task generation.
The loader now reports whether queue admission succeeded, preventing requests rejected during shutdown from remaining pending indefinitely.
Overall, it seems that we got rid of a lock and actually reduced turnaround on UI thread. The separate in-flight tracking takes its tall, but overall throughput increased (tl;dr - it's faster).
EnqueueLoadwithTryEnqueueLoadand fault rejected requests.PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed