ITPub博客

首页 > 应用开发 > IT综合 > Firefox 终极提速

Firefox 终极提速

原创 IT综合 作者:skypro 时间:2006-09-09 09:25:16 0 删除 编辑

为了照顾普通用户的需求,FX出版时在性能上做了大众化的配置。可是我们每个人的机器配置和网络环境是不同的,在这里我们完全可以手动更改 user.js 文件来获取最佳的浏览速度。

......

[@more@]

快速设置



CODE
user_pref("network.http.pipelining", true);
user_pref("network.http.pipelining.firstrequest", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("nglayout.initialpaint.delay", 0);


这个设置在很早经前就已经有人放出来了,Pipelining (管道)同时发出成倍数的连接请求,从而达到提升连接速度的效果。我觉得这也是为什么 IE 的速度会比早期的 Mozilla/Netscape 更快的一个重要的原因。

Initial Paint Delay 实际上延迟了整个网页的显示速度,但是因为用户更喜欢在整个网页完全截入之前就开始阅读网页(就像流媒体那样),所以在这里可以把值调低,加速网页的载入。


下面的设置是从Mozillazine 的众多相关主题中总结来的,其中有部分设置是很有争议的。

通用设置



下面的设置看起来是通用的,只是做了两个补充- 插件的路径可以在about:plugins 中找到,关掉了书签菜单延迟。

CODE
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("content.notify.backoffcount", 5);
user_pref("plugin.expose_full_path", true);
user_pref("ui.submenuDelay", 0);


高配置,宽带



CODE
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("browser.cache.memory.capacity", 65536);


这里有一点需要注意:Firefox 默认分配 4096 KB 的 cache.memory,而在这里设置的最后一行我们粗略的分配给它大概 65M,当然这个数值可以根据实际需要做改动。

高配置,网络连接比较慢



以下的设置适用于网络连接不理想的用户,当然还不是说还停留在小猫时代的用户,而是指比较慢的DSL / Cable 连接。

CODE
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("browser.cache.memory.capacity", 65536);


高配置,窄带



CODE
user_pref("browser.xul.error_pages.enabled", true);
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 30
00000);
user_pref("content.maxtextrun", 8191);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("network.http.max-connections", 32);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 8);
user_pref("network.http.max-persistent-con
nections-per-server", 4);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("browser.cache.memory.capacity", 65536);


低配置 宽带



CODE
user_pref("content.max.tokenizing.time", 3000000);
user_pref("content.notify.backoffcount", 5);
user_pref("content.notify.interval", 1000000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 1000000);
user_pref("content.maxtextrun", 4095);
user_pref("nglayout.initialpaint.delay", 1000);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("dom.disable_window_status_change", true);


说明一下最后一条设置:当改变网页时状态栏被禁用,可以节省载入时间。

低配置 窄带



这是适用于很郁闷的小猫用户的

CODE
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 750);
user_pref("network.http.max-connections", 32);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 8);
user_pref("network.http.max-persistent-connections-per-server", 4);
user_pref("dom.disable_window_status_change", true);





以上并没有包括类似像 catching SSL pages 这类建议。 虽然关于此类设置观点并不尽相同,可有一点是共同的:更改 pipelining 的确可以提高 firefox 的速度。

低端用户也可以像高端用户那样将 firefox 默认调用 4M cache.memory 的数值调高。 而拥有高频或者双 CPU 的用户同样也可以禁用状态栏来提升速度。

对应于这些设置,有一个名为FireTune的软件可以帮你完成复杂的手工操作。
FireTune是曾经制作了着名的WindowsXP优化软件TweakXP的Total Idea制作的一款免费Firefox自动优化软件,目前的版本是1.0,可惜没有汉化版。有兴趣的朋友可以进一步研究。

FireTune

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7802964/viewspace-864109/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-08-10

  • 博文量
    27
  • 访问量
    547663