Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Fix big performance impact when restoring tabs.
Browse files Browse the repository at this point in the history
The downside is that mail tabs opened before closing the browser may stop working properly. It's better to open new ones.
  • Loading branch information
Oriol Brufau authored Aug 15, 2017
1 parent eeceea5 commit 672cc5b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions chrome/content/overlay-ff.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ if(com.tobwithu.xnotifier.p_getBoolPref("multiSession")){
var browser = gBrowser.getBrowserForTab(event.target);
browser.addProgressListener(com.tobwithu.xnotifier.main);
}, false);
for(var i=0;i<gBrowser.tabContainer.childNodes.length;i++){
/* The following loop allows mail tabs opened by X-Notifier to still work properly after closing
and restoring the browser. However, it prevents the optimization achieved in bug 1345090
(https://bugzilla.mozilla.org/show_bug.cgi?id=1345090), so the browser takes much more time
to restore tabs. That's why it has been commented out. */
/*for(var i=0;i<gBrowser.tabContainer.childNodes.length;i++){
var browser=gBrowser.getBrowserForTab(gBrowser.tabContainer.childNodes[i]);
browser.addProgressListener(com.tobwithu.xnotifier.main);
}
}*/
}
}

Expand Down Expand Up @@ -206,4 +210,4 @@ com.tobwithu.xnotifier.getBMfolder=function(title){
}
rootNode.containerOpen = false;
return bmsvc.createFolder(menuFolder,title, bmsvc.DEFAULT_INDEX);
}
}

0 comments on commit 672cc5b

Please sign in to comment.