ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Unique way to make Firefox load faster

(1/3) > >>

nosh:
This one's apparently been out there for long but I couldn't easily find a reference to it on DC.

The tip basically asks us to use upx to compress *.exe and *.dll in the main Firefox (installation) folder and *.dll in the "components" and "plugins" subfolders.   
I haven't timed it but I'm pretty certain Firefox actually does load faster after I upx'd the files.

If any of you go for it please note down your FF load time before compression so you can observe the difference and post your results here.

Link

masu:
I agree
I also use this technique to improve the startup time for FF.
As long as you have enough memory, this tip should work  :Thmbsup:

Ralf Maximus:
I don't doubt the performance claims (I'm off to try it for myself in a bit) but... this seems totally counterintuitive.  How can compressing an executable improve performance?  Wouldn't any gains made by loading smaller files be lost during the decompression process?

Or is it true that this technique only applies to certain classes of executable?  For instance, FireFox is a win, but running upx on (say) Microsoft Office makes things worse?

UPDATE: I tried it, and sure enough, FireFox seems zippier.  Purely subjective, but it really does seem to load faster.

I did some quick googling on UPX and learned that the effect works well for applications that are run once (e.g. FireFox) but does not work very well for applications that load multiple times and "share" memory footprints (Office, for example).  For those apps, the compressed nature of the .exe prevents Windows from sharing the memory, resulting in multiple copies of the same .exe eating up identical chunks of RAM.  May be a trivial matter on a 2GB workstation, or maybe not -- its your call to make.

Also, I learned that UPX uses an in-place decompression routine which means it (usually) does not generate temporary files.  This is good, in that reading the whole compressed .exe and writing out a decompressed version before running it would actually degrade performance, not enhance it.

Some performance gains may be due to the virus scanner you use.  Many cannot read a UPX-compressed executable beyond the loader, which short-circuits scanning of the whole file (which is seen as data).  Thus, instead of scanning (say) 10 megabytes of .exe for malware, only the first few K are scanned -- a significant savings.

The flip side to this is a bit worrisome: if your virus scanner cannot penetrate the .exe, it can't protect you.  Many viruses & trojans come compressed with UPX (or similar techniques) for this reason alone.

I checked and the scanner I use -- NOD32 -- does scan UPX compressed executables.

As in most things, the bottom line is: YMMV.  The FireFox hack seems to be a win, and so I'll keep it.  But thanks to nosh I learned about a new utility today which I will use to experiment with on my own projects.  Thanks!

MrCrispy:
Compressed exe's run faster because on modern cpu's, uncompressing takes less time than disk IO. This is the same reason why realtime encrypted filesystems (like EFS or TrueCrypt) can sometimes do better on benchmarks as long as the encryption algorithm is simple enough.

But I really don't see much need for this. FF is one of those apps which I load once and it keeps running always. I wish the devs would fix the huge memory leaks in FF, its the only reason I ever restart FF (that and adding an AddOn).

nosh:
And thank you for your post Ralf, coz I was wondering the same thing about compression vs efficiency and the downside (if any) to it all and you've shed some light on these matters.

MrCrispy, I'm with you on never shutting FF down, I've even customized it by removing the close button and replaced it with minimize so I don't close it by accident, one of the best decisions I've made, in retrospect. Even so, I do have to start FF atleast once a day and any time I can shave off its long (to put it mildly) loading time is a good thing. From what I hear FF3 is an even bigger memory hog, now _that's_ an achievement!

Navigation

[0] Message Index

[#] Next page

Go to full version