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

<< < (2/3) > >>

Renegade:
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).
-MrCrispy (October 22, 2007, 11:20 PM)
--- End quote ---

This is one of the main reasons that I use Opera now.

The hack is interesting... I'll have to give that a look-see. Never would have guessed that...

f0dder:
Remember that you need a reboot (or other way to flush the filesystem cache) before you do your timing.

Indeed compressing executables mean that their memory can't be shared. Pretty bad if you're running multiple instances of something, especially if it's in a terminal server environment.

UPX and other exepackers indeed don't decompress-to-disk, that would make them useless.

If you're using a virus-scanner that can't scan into UPX executables, get a different scanner, as the one you're using is useless. This also means that, if you're using a virus scanner that doesn't suck, UPX'ing executables can slow down startup time quite a bit.

When UPX'ing an executable speeds things up, it means the executable is horribly bloated and has a crazy loading pattern. The problem isn't really with disk speed as MrCrispy says, but that executables are "demand-loaded" in 64kb chunks... if windows did a one-blast read of the executable instead, things would be different.

EDIT: doesn't seem to speed up things here anyway, as slow as ever to boot up. The ff devs really ought to spend some time fixing bugs and leaks, and tracing ff startup to optimize it, instead of adding new features.

BigJim:
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).
-MrCrispy (October 22, 2007, 11:20 PM)
--- End quote ---

My practice is the same, MrCrispy. As such I find there's a very useful feature in the Update Notifier Add-On (in itself a real time saver!) labeled 'Restart Firefox ...". I'll often hit that when I leaving my desk for a few minutes and it's done the job by the time I return.

Neat on removing the close button, nosh. I'll bite. How did you do it?

Ralf Maximus:
UPX and other exepackers indeed don't decompress-to-disk, that would make them useless.

--- End quote ---

According to the UPX website (http://upx.sourceforge.net/) this may not always be the case.  They are careful to say that under some circumstances the .exe cannot be decompressed in RAM, and must be uncompressed to a file then run from that.  Unfortunately they do not describe what those circumstances are.

Even a low memory condition should force unpacking into the paging file, right?  Mmmmm, the smell of performance.

Or perhaps this is a nod to their cross-platform crowd -- maybe running the Atari or DOS versions of UPX do this, but not the Windows version.  I'm satisfied that the Windows build seems to use RAM exclusively, at least on the few (half-assed, completely unscientific, probably drunk at the time) tests I've run here.

Observation: The UPX project appears to have started in 1996.  That means that when UPX got rolling computers were slow, had one-tenth the memory, and bandwidth was dragged through 56K modems like taffy.  Back then, compressing .exe files for download made a lot of sense. 

Unpacking the bastards probably took a loooooong time, but was considered worth it by some.  I can easily see some websites deciding to use UPX, because making people use PkUnZip was "too complicated".

The fact that UPXing a file can actually enhance performance is a happy side-effect, a complete accident of modern PC hardware.

f0dder:
Ralf Maximus: one of the "has to be decompressed to disk" used to be the case with ELF compression, and iirc they had some lame excuse like "linux is a properly protected OS unlike windows" - but afaik these days, they learned how to do in-memory elf decompression.

Yes, a low-memory situation could force other applications to the paging file, and the decompressed-to-memory executable can of course be paged out as well (as opposed to discarded and re-read, as normal executables are handled).

Unpacking didn't take a long time back then either (compression is slow but decompression is very fast, that's one of the traits of the class of compression algorithms generally used by exe packers) - and disk drives were MUCH slower back then (who where remembers PIO modes?).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version