Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context Menu Slow to Open #2527

Closed
sguergachi opened this issue Dec 3, 2020 · 9 comments
Closed

Context Menu Slow to Open #2527

sguergachi opened this issue Dec 3, 2020 · 9 comments

Comments

@sguergachi
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I right click on a file item the right click context menu takes at least a few seconds, which is considerably slower than native File Explorer and frequently interrupts my flow of using this app, making it unusable for me.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I want it to show context menu as soon as possible, and if need be, load additional context menu items asynchronously, that way items that should be readily available (cut, copy paste) don't need to wait for context items that need more time to load in.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Using native file explorer.

Additional context
Add any other context or screenshots about the feature request here. Ex: What device type/UI layout and app version?

This is my context menu for reference
image

@sguergachi
Copy link
Author

Basically if we can have an instant access to these items on right click and load in the rest as they come in, that would improve UX by a lot

image

@ShankarBUS
Copy link

ShankarBUS commented Dec 7, 2020

How about using a CommandBarFlyout instead of a MenuFlyout?

Would that cause any problems?

@Chris2011
Copy link

I can reproduce it. But IMHO it is more a bug or misbehaviour than a new feature.

@gave92
Copy link
Member

gave92 commented Dec 31, 2020

Some findings on this.

I've added a stopwatch in a couple of checkpoints to see what is taking the longest:

QueryContextMenu [ms] LoadContextMenu [ms] SetShellContextmenu (total) [ms]
57 70 93
334 368 420
1576 1609 1681
2208 2232 2285

More than 80% of the time is taken by the single line QueryContextMenu and the time taken by it varies greatly from a few milliseconds to more that two seconds. Anything above ~800ms is perceivable as a delay.
QueryContextMenu is pretty much a single Win32 API call so I'm not really sure on how to improve this.

Showing the basic items first and then adding the other items after the menu is shown is currently impossible as with MenuFlyout all the menu items needs to be added before the menu is shown.

@Jenriksen
Copy link

If I can assist with solving this issue by any means please let me know.
The project looks very promising, but almost 2 sec to open a context menu is just too much for most people.
I have some c# skills to utilize.

@sguergachi
Copy link
Author

This should be included in work done in #4180

@pklion
Copy link
Contributor

pklion commented Mar 29, 2021

Can't we improve performance by hiding no-needed items?
I think it'll be better if the editor of right-click menu which valid only for Files available.

@Chris2011
Copy link

I think this just make sense when you select a file. In the normal explorer we have different entries for File, Folder and nothing is selected.

@yaira2
Copy link
Member

yaira2 commented Apr 27, 2021

This issue should be resolved in main.

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

No branches or pull requests

7 participants