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
SCMViewlet creates many, many action items #63693
Comments
Once you have scrolled up and down as fast as you can, then scrolling just 1 row will create 180 new menu items |
@jrieken Good catch. This is a consequence of menus having coarse "I just changed" events. I then create the action array for that menu and from there create the matching action item array. As the fix, I introduce an action cache, so I can do On top of that there were two places in which I simply wasn't disposing disposables. 🤦♂️ |
Menus can fire events when the actions change (hide/show) and when some state (checked, precondition) changes. The latter two aren't exposed to extensions so it shouldn't be thing for the SCM viewlet... @joaomoreno I wonder what events you are receiving here so that the cache will ever catch something? |
I pay attention to the menu change event for when context keys change, eg git contributes different actions depending on the state of the repo. |
You mean you only listen to the menu change but not to context key changes yourselves, right? |
Yes. I listen to the menu changes, which fires when context keys change. |
I'm still seeing the following potential leak in latest master:
This was after staging |
Actually, I'll open a new issue since I don't see the action item problem anymore |
With the new listener leak limit being 100 and without 0e86dd6 you can see the following warnings on the console while scrolling up/down in a full SCM viewlet
The text was updated successfully, but these errors were encountered: