Optimizing load times?

nao 7 years ago updated 7 years ago 0

So I now have 3304 tabs in my Opera browser, thanks to the latest move to unlimited storage. This is life-changing, no longer having to bother keeping the tab count below 2000. (And yes, if you're wondering, I'm mostly trying to ascertain the 'new limits' offered to me. I'll eventually drop my tabs below 2000 again, because that's what works best for me.)

However, the more tabs I have, the longer it takes to start Opera. It first shows me the main window, then the Sidewise bar, then after a while the page tree shows up, with 'Last session', which then automatically gets turned into 'Window' (current session), and all tabs show up, but they're all in Hibernated view.

This is when it gets 'interesting'. The Sidewise panel subsequently freezes. I can occasionally access its scrollbar to reach the end, but that's all. It progressively removes Hibernating mode from all tabs sequentially, until it reaches the end, so I've gotten used to just checking out where it's at currently. Today I metered that phase duration, and it lasted for a whopping 25 minutes. I've learned to do other things, or just not use the sidebar (and just browse in a single tab) while the bar is loading, but it *is* a little strange that Sidewise would take 25 minutes to load the page tree status for 3300 tabs. That's barely one tab per second..?! Since the slowdown gets exponentially longer as the tab number grows, I'm thinking perhaps each tab restore is doing an operation that manipulates ALL tabs by mistake. I suppose the slowdown lies in the restoreNodeFromRecentlyClosedTree function (background.js), perhaps something about the ghost tree..?

After that phase, the sidebar is still frozen for a while... I'd say a minute or so. It's acceptable though. What I'd really like is to find the bottleneck for the 'hibernated to not hibernated' transformation phase. Any ideas?