MozTW 討論區 https://forum.moztw.org/ |
|
20行代碼讓Windows版Firefox啟動速度快一倍 https://forum.moztw.org/viewtopic.php?f=18&t=31714 |
第 1 頁 (共 1 頁) |
發表人: | adam [ 2011-01-24, 08:18 ] |
文章主題 : | 20行代碼讓Windows版Firefox啟動速度快一倍 |
We page in most of xul.dll and mozjs.dll. So i figured why not try lazy-linking libxul and preloading it. Turned out lazylinking didnt make any difference, but preloading seems to consistently shave up 2seconds of startup on my profile(40%). I'm going to doublecheck on my favourite user's slow computer. Here is the patch in meantime. Basic idea is that the sequential flag + bullshit read tricks windows into reading xul in 2mb chunks instead of stupid 32k(or smaller) ones. Have to do it this way because there is no fadvise() on Windows(that I know of) A big sequential read cuts down on a lot of seeks. Bug 627591 - preload dlls on windows |
發表人: | Vega [ 2011-01-24, 09:20 ] |
文章主題 : | Re: 20行代碼讓Windows版Firefox啟動速度快一倍 |
如果這個真的可以成功的話,對Firefox的使用者而言真是一大佳音!! |
發表人: | Merci chao [ 2011-01-25, 19:07 ] |
文章主題 : | Re: 20行代碼讓Windows版Firefox啟動速度快一倍 |
哦哦,好消息好消息。 不過平常我都沒怎麼抱怨 FX 的啟動速度,感覺還好吧。在啟動時快零點幾秒實在不會帶來甚麼驚喜。我比較期待它的防假死措施,現在工作管理員已經是 FX4 的另一半了,呵呵。 ![]() 話說那個 patch 是甚麼用的呢?有點好奇。 |
發表人: | 新文字文件 [ 2011-01-28, 23:03 ] |
文章主題 : | Re: 20行代碼讓Windows版Firefox啟動速度快一倍 |
adam 寫: 原理是在程序預讀階段將XUL的chunks從數M變成32k或者更小 Bug 627591 - preload dlls on windows 大小顛倒了,原文是reading xul in 2mb chunks instead of stupid 32k(or smaller),主要是減少I/O需求。 根據討論串後半,只有VISTA之後的系統才有實質效用,大概是因為記憶體管理方法有所改變的關係。 |
發表人: | jim1960 [ 2011-01-29, 11:42 ] |
文章主題 : | Re: 20行代碼讓Windows版Firefox啟動速度快一倍 |
ayakawa 已有實驗性版本,感覺啟動速度真的快了一點.. http://big.freett.com/runebook/namoroka-ce-3.6.15pre-ayakawa-110127-test2.7z |
第 1 頁 (共 1 頁) | 所有顯示的時間為 UTC + 8 小時 |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |