If we use a simpler XUL interface and xulrunner instead of original firefox, it can save about 9 seconds. (Maybe that's why the Prism project exists :-)
After profiling we can find out the problem is caused by a huge amount of I/O, the first start of xulrunner will read nearly 75MB files including .so, .xpt and fonts. (See the whole files list: readahead.txt )
Survey
Here's some common approach:- UPX - binary compression
- prelink - static library
- readahead - prefetching files
- swiftweasel - CPU optimization
cat `cat readahead.txt` >> /dev/null
.Result
Sorted by total time:mount | prefetch | xulrunner | total time | |
no-prefetch | 10s | N/A | 28s | 40s |
parallel-prefetch | 10s | 23s | 44s | |
prefetch | 10s | 16s | 15s | 46s |
toram-prefetch | 20s | 14s | 15s | 51s |
Conclusion
- file priority or size should be taken into account when prefetching
- the next bottleneck target is the start script (xulrunner-1.9 or run-mozilla.sh), it takes 7 seconds
- standalone firefox?
沒有留言:
張貼留言