Is your feature request related to a problem? Please describe.
Reducing memory usage when restoring sessions using Firefox native discarded state on new tabs.
Describe the solution you'd like
Support "discarded" property for browser.tabs.create() when restoring tabs. (Arriving in Firefox 63 - https://bugzilla.mozilla.org/show_bug.cgi?id=1378647)
Describe alternatives you've considered
You already have a good alternative with your temporary lightweight tabs.
I read it boosts performance incredibly.
Firefox 63 has arrived now. I would really like if this approach would be used, because I suspect that this would cut down memory consumption down, too. I'm not convinced that I need 3.2 GB for about 750 tabs, if maybe 30 are actively used (yes, I'm horrible with closing tabs).
I added option to use "discarded" property for lazy loading! https://github.com/sienori/Tab-Session-Manager/commit/45719c35b5e301d34531b4cf1e7b23e0210b280e
Session restore performance will be greatly improved.
I played around with it today and it works great in terms of performance!
I did notice that almost all of the favicons were set to the default, but obviously they load properly once the tab is activated. I am not sure if that is because they don't support setting the favicon when creating the tab in the discarded state or if you are not storing the favicon as part of the session. (Could be either or both I would guess)
Either way, this is a great new feature!
In order to set the fabicon to discarded tabs, this bug needs to be solved. https://bugzilla.mozilla.org/show_bug.cgi?id=1475240
Thank you sienori ... I already had that one on my watch list and forgot! Shame it will be a long while before we see that getting into production. (It took from FF58 to FF63 to fix some of the favicon & session store issues) So obviously this is now working as expected. Closing ...
In order to set the fabicon to discarded tabs, this bug needs to be solved. https://bugzilla.mozilla.org/show_bug.cgi?id=1475240
I added some information to this defect trying to emphasize the importance of adding this feature. No idea if it will help, but I figure it probably won't hurt considering the lack of discussion so far on that item.
In order to set the fabicon to discarded tabs, this bug needs to be solved. https://bugzilla.mozilla.org/show_bug.cgi?id=1475240
Vote on Bug 1475240, Bug 1450382, Bug 1462813, Bug 1427928 and other Firefox bugs listed here: #150 - to speed up this correction process including preparation of APIs by Mozilla and adding this future (and other ones) to TSM.
Hello, @sienori!
Since TSM is already aware of Tree Style Tab extension, would it be possible to support favicons for pending tabs on the sidebar for now?
As far as I understand it's just a HTML page simulating tabs so it doesn't require cooperation from Mozilla to draw favicons.
Voted on those bugs at Bugzilla though.
@reallyuniquename
If you disable the Use the "discarded" property for lazy loading option, favicons are displayed.
@sienori
Yeah I know about that but it's not the same thing.
I would prefer natively pending tabs to TSM stub pages. Things get complicated when you have hundreds of tabs.
Moreover if I disable the Use the "discarded" property for lazy loading those tabs don't have discarded CSS class so I can't even highlight them, they look just like normal tabs which makes the feature unusable for me.
@reallyuniquename
If the Use the "discarded" property for lazy loading option is enabled, it is impossible to display the favicon for now.
As far as I understand it's just a HTML page simulating tabs so it doesn't require cooperation from Mozilla to draw favicons.
No, it is not a HTML page simulating tabs if the option is enabled.
It is a original URL opened with the discarded property by tabs.create().
Setting a favicon on the discarded tab is not possible due to a bug in firefox.
Moreover if I disable the
Use the "discarded" property for lazy loadingthose tabs don't havediscardedCSS class so I can't even highlight them, they look just like normal tabs which makes the feature unusable for me.
I can not understand what the CSS class means.
@reallyuniquename
You need to have this bug fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1475240
See my message written on Jan 4.
@sienori
Wait, I think I confused you.
I am talking about Tree Style Tab vertical tab list since Tab Session Manager is already aware of that extension.
My understanding is Tree Style Tab simply opens its own file /sidebar/sidebar.html in the sidebar. It just simulates tab list on a stand-alone HTML page therefore many Firefox restrictions are not applied including any favicon issues.
It should be possible to integrate TSM and TST further and allow setting favicons even for discarded tabs in the TST sidebar at least as a workaround for now. TST has impressive API documentation especially for integrating with other addons.
I can not understand what the CSS class means.
I use custom style sheet for TST sidebar to dim visual appearance of pending tabs. To do that I need to write a CSS selector for such tabs. Genuine discarded tabs inside DOM have class attribute discarded while TSM stubs don't because they are actually loaded tabs that just redirect user.
@RobertAb1
Yep, I've read those and voted on those but this exact issue may have a workaround if you use Tree Style Tabs extension instead of native Firefox tab bar.
Most helpful comment
I added some information to this defect trying to emphasize the importance of adding this feature. No idea if it will help, but I figure it probably won't hurt considering the lack of discussion so far on that item.