 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
jballi
Joined: 01 Oct 2005 Posts: 346 Location: Texas, USA
|
Posted: Fri Jun 23, 2006 10:24 pm Post subject: Use UPX to make Firefox load faster |
|
|
There are literally hundreds of tricks out there for speeding up Firefox. I know, I've tried many of them myself because the biggest complaint I have about Firefox is the almost intolerable startup time. For my 3Ghz P4 with 1GB ram, the program takes more than 12 seconds to load if the program has never run before. In computer time, 12 seconds is a lifetime!
About a year ago, Ian "Gizmo" Richards published a tip about using UPX to compress Firefox and thereby speeding up the startup time. Of course I tried it and lo and behold (I always wanted to say "lo and behold") it worked! Startup time was cut almost in half. Although I understand (for the most part) how compression speeds up start time, I'm certainly don't understand why it speeds it up as much as it does. Startup time is still is not as fast as IE but it is much more tolerable.
Here's my version of the tip (customized for AHK dudes and dudettes)...
Step 1
If you don't have UPX, you can download a copy from http://upx.sourceforge.net/. Put a copy of the upx.exe file somewhere in the path. If you're not sure where to put it, the "C:\Windows" folder is a good spot. If you have AutoHotkey installed, you can also find a copy of upx.exe in the "Compiler" sub-folder. For most installations, it is located here: "C:\Program Files\AutoHotkey\Compiler"
Step 2
Create batch files to compress and decompress Firefox.
Here's my version of the batch file to compress Firefox (Name it Firefox_Compress.bat):
| Code: | pushd "%ProgramFiles%\Mozilla Firefox"
for %%v in (*.exe *.dll components\*.dll plugins\*.dll) do upx "%ProgramFiles%\Mozilla Firefox\%%v"
popd |
This batch file will compress all exe's and dll's in the components, plugins, and the root Firefox folder.
Here's my version of the batch file to decompress Firefox (Name it Firefox_Deompress.bat):
| Code: | pushd "%ProgramFiles%\Mozilla Firefox"
for %%v in (*.exe *.dll components\*.dll plugins\*.dll) do upx -d "%ProgramFiles%\Mozilla Firefox\%%v"
popd |
These batch files have only been tested on Windows XP. You might need to make minor modifications for older versions of Windows.
Step 3
To compress Firefox, run Firefox_Compress.bat. Please note that not all exe's and dll's in the Mozilla folder can be compressed. You may get messages warning you of this. Don't worry, this is normal.
To decompress Firefox, run Firefox_Decompress.bat.
Be sure to close Firefox before running either of these batch files.
Warning: These batch files will modify files on your computer. Please use with care and at your own risk.
Final Thoughts
Of course, everthing comes with a cost. You will need to decompress Firefox in order to perform an update. If you get a message telling you that an update has been downloaded, stop Firefox, decompress, and then restart Firefox. You might need to force the update to be re-downloaded. After the update has been applied, don't forget to stop Firefox and re-compress.
If you're interested, here's a link to original Ian "Gizmo" Richards tip:
http://www.techsupportalert.com/how_to_make_firefox_faster.htm
Good night and good luck! |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Jun 23, 2006 10:54 pm Post subject: |
|
|
| Great tip! Thanks for the easy-to-follow instructions. |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5068 Location: imaginationland
|
Posted: Mon Jul 17, 2006 9:23 pm Post subject: |
|
|
This did speed up my Firefox by a few seconds, great
However I found that compressing all files blocks sessions and cookies, even in safe mode or for a newly installed copy. Perhaps there is a certain file that controls this and needs to be left uncompressed (secury maybe)? If this is true please let me know so I can amend the compression batch file. Thanks. _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 346 Location: Texas, USA
|
Posted: Tue Jul 18, 2006 1:10 am Post subject: |
|
|
OK, I'll bite. I'm not too smart sometimes...
| Titan wrote: | | compressing all files blocks sessions and cookies... |
Do you mean session cookies? I had to look this one up. According to one source, a session cookie is a "Temporary cookie stored in a computers memory for remembering preferences during a web site visit that is flushed on leaving the site."
Personally, I install all kinds of software/updates to block ads and malicious sites, so running into a site that complains about my setup does occur on occasion. But other than that, I have no problem using the compressed version of Firefox for secure and general-purpose browsing.
I definitely use cookies so I select the "Allow sites to set Cookies" option but I also set the "Keep Cookies until I close Firefox" option to automatically delete the billions of extraneous cookies that are created during a typical browsing session. For cookies that I want to keep permanently, like cookies for Autohotkey.com, I add the web site to the "Exceptions" list with the status of "Allow". These options may affect session cookies.
I noticed that the new version of UPX (version 2.01) appears to compress more of the files in the Firefox folders. You might want to try the new version of UPX, if you haven't already, to see if it makes a difference.
If all else fails, post a couple of the sites where you're having a problem. At least we'll be able to duplicate the problem and maybe someone out there can help to identify which exe or dll (if any) should be excluded from the compression list.
Them be my thoughts... |
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 346 Location: Texas, USA
|
Posted: Thu Dec 21, 2006 12:30 am Post subject: |
|
|
Minor update... I just downloaded and installed the latest version of Firefox: v2.00.01. From a compression POV, big mistake. For some reason, most of the modules are not compressible, at least not by UPX. I tried UPX v2.01 and v2.03 without any luck. I haven't tried any of the older versions of UPX.
I did a quick downgrade to Firefox v2.0 and I'm good to go. Obviously this is a short-term solution but it will keep me going for a little while. You can download older versions of Firefox from here: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
If I find anything, I'll post it. If anyone knows the whos or whats of this issue, please post!
Them be my thoughts... |
|
| Back to top |
|
 |
wtg
Joined: 04 Oct 2006 Posts: 63 Location: Louisville, KY
|
Posted: Thu Dec 21, 2006 6:18 pm Post subject: |
|
|
Also, consider how your extensions might be effecting your startup time. I investigated why on my fastest machine FireFox startup was about 3 times as long as on a much slower one.
Turns out Delicious (put the appropriate punctuation in there as you see fit) was adding about 10 seconds to my startup time... it had to go. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|