cht電腦資訊網路
adm Find login register

firefox 4.0b5 開始使用 omnijar

coolcd
1 firefox 4.0b5 開始使用 omnijar
Promote 1 Bookmark 02010-08-15quote  

Omnijar. How does it work?

firefox 4.05b5 將預設使用 omnijar 的打包方式。

以前的 firefox,一開始是用 flat packaging,就是檔案直接放在資料夾內,後來將 chrome 資料夾內的檔案用 jar 包起來,現在更進一步,用 omnijar 這種新的打包格式,把可以放進去的都放進去 omnijar 中。

未使用 omnijar 前,firefox 的 package 有 259 個檔案(不同平台可能稍有差異),改用 omnijar 後,只有 61 個檔案。

據說,使用 omnijar 有以下優勢:

It’s faster.

Storing related files in a jar is more efficient than scattering files across the filesystem. Flat packaging causes a sort of high level fragmentation where related files might be stored far apart on the disk and result in wasted time seeking. Keeping everything in a file minimizes fragmentation. Startup time is generally improved. Omnijar also paves the way for other startup optimizations.

It’s useful for developers

Omnijar improves performance for users, but it also provides a handy feature for developers – omnijar packaging can be easily converted into flat packaging. To do so, unzip the omni.jar file and delete it. Any file can then be directly edited.

Developers building Firefox with omnijar enabled (–enable-chrome-format=omni) should know that the build in the dist/bin directory is flat packaged. Files are only packed into the omnijar after packaging with |make package|.

cht電腦資訊網路
adm Find login register
views:3380