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
TST-we is too slow to rebuild tree when reopen TST sidebar #1425
Comments
Current result of startup (reload):
reopen sidebar:
|
|
Data point: I have a browser with over 500 tabs. TST takes around 50-60 seconds to finish loading, give or take. This is with 5 major trees. The largest tree has ~170 tabs. The loading time is much faster when I flatten the trees, about 26 seconds. System is a 2010-era i7 x5650 @ 3.7 Ghz in Win10 Pro. |
By parallelized initialization, the startup time is reduced for me.
Before parallelization, it took 5000-6000msec for me. |
I have about 600 tabs an it takes 4 seconds to rebuild tree. It is not bad but of course faster is better especially after switching from History or Bookmarks back to Tree Style Tab. |
On 2.2.0, more optimization has landed. |
V 2.3.0 seem faster but still to slow ;). Also the loading is kind of strange: first the tabs appear, then the tree is made until the end their is a loader on top of the UI. This cause certainly lot of unnecessary repaint. I didn't look at the code, but can't we keep a tab tree in memory and update it when tabs are opens? Say that I don't understand why making this tree take so long. With 10 tabs it should take 0.001ms. But we shouldn't draw the UI before data are ready I think. |
There are two cases of tree restorations.
The reason why case 1 is quick is: TST can assume that it is window restoration and can skip some operations. The restoted window have a session data stored by TST: the structure information of whole tabbar. On the other hand, there is no such hint to assume it is window restoration at case 2, so TST need to restore tree from relative relations of tabs step by step. WebExtensions doesn't have any event to notify Firefox is going to restore window at case 2. If we know that the restoration is started, we'll make the case 2 more quickly... |
Stupid question: will this bug help? |
The bug 1413525 seems talking about APIs for addons like Session Manager. It won't help TST if no any new event is notified when a session is going to be restored, because TST won't include such session management system by self (it is quite out of the target range of this project). |
Oops, sorry, I misunderstood this to another issue about session restoration... |
https://github.com/piroor/treestyletab/tree/reopen-tabbar-from-cache experimental branch to try caching built DOM tree. Still there are many problems around information not stored as attributes - TST stores some information to HTML elements just as a JS property and it won't be serialized and need to be restored manually. Or, possibly I need to rewrite everything based on virtual DOM, but it is very hard work for me and it will be the the version 3.0. |
Now the cache system is merged to master, but I think we need more doogfooding. |
I close this because outdated. |
Short description
SSIA
Steps to reproduce
Expected result
The TST sidebar should appear as fast as bookmark sidebar
Actual result
It takes too much time(1-3sec)
Environment
The text was updated successfully, but these errors were encountered: