Improve tab restoration behavior when opening a solution#91
Improve tab restoration behavior when opening a solution#91magasser wants to merge 7 commits intoMattParkerDev:mainfrom
Conversation
|
I agree the current behaviour is not ideal. I'm hoping we can just speed up how long it takes to open all the tabs instead, so that the panel is blank for much less time? My guess is the expensive part is creating all of the SharpIdeCodeEditContainer nodes, to be placed as children of the TabContainer? |
The long blank code editor is indeed not ideal. Adding a loading spinner is probably a good idea. I took a quick look at where the time is spent, and the main bottleneck seems to be, as you predicted, the calls to With ~140 tabs, instantiating all containers currently takes about 7 seconds. I see two potential approaches to improve this:
Do you have any other ideas for speeding this up? |
|
I committed 1ca286c which feels like it speeds up the file tab loading (without actually timing it). If you could merge in main, and lmk whether you agree that it seems improved.
I like this idea. Doesn't need to be done in this PR, and I might take a look at it myself tomorrow.
Not a huge fan. Spinner looks good functionally, not totally sold on its design though 😅 Maybe smaller, and/or less opacity? My other thought is the full width blue loading bar at the top, like what VSCode has, when you e.g. Go To Definition on a Method requiring decompilation. Or even just text in the center, not too white, I also think we should consider a max open tabs limit - Rider's is 100 by default. Would start closing tabs on the left if adding a new one would go over the limit. |
I tried it out but I did not really notice any improvement.
Regarding this, I experimented with a complete lazy-loading solution by creating an empty tab scene and only instantiating the It is by no means a clean solution at this point as I wanted to make as little changes as possible and there still seem to be a few issues but it could be worth investigating further. I have a PoC implementation on a branch if you’re interested: code-edit/lazy-load-tabs.
I will have a look to implement some other designs. |

Description
This PR improves the experience when opening a solution and restoring previously opened tabs.
Overview
Previously, opening a solution would reopen and sequentially select every previously opened tab. With many tabs, this resulted in a poor user experience.
This update changes the behavior so that all tabs are restored simultaneously, and only the previously active tab is selected. This provides a better experience when reopening a solution.
Old Behavior
New Behavior