mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 13:12:27 +01:00
delay preloading after most tabs should be restored, makes Firefox startup. When we enable the awesomebar completions by default, we might even :set nopreload by default.
This commit is contained in:
@@ -210,7 +210,11 @@ function Bookmarks() //{{{
|
|||||||
|
|
||||||
liberator.registerObserver("enter", function () {
|
liberator.registerObserver("enter", function () {
|
||||||
if (options["preload"])
|
if (options["preload"])
|
||||||
cache.bookmarks; // Forces a load, if not already loaded.
|
{
|
||||||
|
// Forces a load, if not already loaded but wait 10sec
|
||||||
|
// so most tabs should be restored and the CPU should be idle again usually
|
||||||
|
setTimeout(function() { cache.bookmarks; }, 10000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
@@ -580,7 +584,11 @@ function History() //{{{
|
|||||||
|
|
||||||
liberator.registerObserver("enter", function () {
|
liberator.registerObserver("enter", function () {
|
||||||
if (options["preload"])
|
if (options["preload"])
|
||||||
load();
|
{
|
||||||
|
// Forces a load, if not already loaded but wait 15sec
|
||||||
|
// so that we don't load it at the same time as bookmarks
|
||||||
|
setTimeout(function() { load(); }, 15000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user