K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmSpeedUp

Submitted by: kko, originally by Johnny Sim-Bravenboer



Notes:

This macro demonstrates how to increase K-Meleon's PageSpeed.

See also:


Updates:

2007-06-28
Updated to the K-Meleon 1.1 macro system.




Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder (Edit > Configuration > Macros) and create the following text file(s):

SpeedUp.kmm

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Page Load Speed-Up ------------------------------------------------------------------------------------
#
# Dependencies : -
# Resources    : -
# Preferences  : -
#
# ------------------------------------------------------------------------------------------------------------------

SpeedUp_Toggle{
menuchecked=(getpref(BOOL,"network.http.pipelining")==true);
getpref(BOOL,"network.http.pipelining")==true?&_SpeedUp_Disable:&_SpeedUp_Enable;
}

# ----- PRIVATE

_SpeedUp_Enable{
statusbar(sub("%s",$on,_("Page load speed-up %s")));

# TURN ON TIMER BASED REFLOW MANAGEMENT
setpref(BOOL,"content.notify.ontimer",true);

# SETS THE ALLOWED TIME BETWEEN REFLOWS IN MICROSECONDS
setpref(INT, "content.notify.interval",240000);

# SET THE NUMBER OF REFLOWS TO DO BEFORE WAITING FOR THE REST OF THE PAGE TO ARRIVE
setpref(INT, "content.notify.backoffcount",10);

# ENABLE IMPROVED PIPELINING
setpref(BOOL,"network.http.pipelining",true);
setpref(INT, "network.http.pipelining.maxrequests",8);
setpref(BOOL,"network.http.proxy.pipelining",true);

# INCREASE MULTI-THREADED DOWNLOAD PERFORMANCE
setpref(INT, "network.http.max-connections",24);
setpref(INT, "network.http.max-connections-per-server",16);
setpref(INT, "network.http.max-persistent-connections-per-proxy",8);
setpref(INT, "network.http.max-persistent-connections-per-server",4);
}

_SpeedUp_Disable{
statusbar(sub("%s",$off,_("Page load speed-up %s")));

# RESTORE DEFAULTS
delpref("content.notify.ontimer");
delpref("content.notify.interval");
delpref("content.notify.backoffcount");
delpref("network.http.pipelining");
delpref("network.http.pipelining.maxrequests");
delpref("network.http.proxy.pipelining");
delpref("network.http.max-connections");
delpref("network.http.max-connections-per-server");
delpref("network.http.max-persistent-connections-per-proxy");
delpref("network.http.max-persistent-connections-per-server");
}

_SpeedUp_BuildMenu{
# tools menu
setmenu(Settings,macro,"Page Load &Speed-Up",SpeedUp_Toggle);
}
$OnInit=$OnInit."_SpeedUp_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."SpeedUp;";


K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.