-
Notifications
You must be signed in to change notification settings - Fork 31.8k
TabsTitleControl.layout()
slows down editor resize
#34745
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
Comments
Note: the time TabsTitleControl.layout takes is significantly larger when using the steps in #34716 i.e. 3K+ code lenses. |
@alexandrudima looks like most time is spend in this call: I am happy for advice how to avoid that. The tab title control is a I need the Maybe one idea is to buffer the layout calls and not run them sync from the mouse move listener in the sash widget. /cc @joaomoreno |
@bpasero I use various tricks to avoid sync forced layout:
IMHO those two bullet points should cover the computation of |
Yeah, the width should actually only be measured at the top level of a |
The expensive part is indeed the call to |
This is really bad. When opening/reloading the workbench with just one tab, ~50ms are spend. That makes it the most expensive single call after code loading and garbage collection. |
@jrieken interestingly as soon as I move that layout call into a |
Should we consider something like https://github.com/wilsonpage/fastdom? |
@jrieken I think |
Pushed 2 changes:
The fix of avoiding a second layout call brings some nice performance boost for resizing of editors. The remaining performance issue with tabs is the fact that we access
I am not a big fan of going away from flex, so I will stop here for now. @jrieken I extracted the startup perf issue into #38404 so that we have something to close and verify for November. I will keep this issue open and restore it how it was before. |
@bpasero Did we make further improvements to this or why is this closed? |
TabsTitleControl.layout()
slows down editor resize
Talked with Alex and he is 👍 to close this issue given the changes I have made so far, esp. c35e63f has helped in my measurement. |
Most of the time is spent in two things:
The text was updated successfully, but these errors were encountered: