The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Getting old software/games running on older hardware.

The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-6-06 @ 10:34

*UPDATE!*

I have done some major reworks to the previous version, as I have found some bugs that for some reason I overlooked. I also have implemented some new entries in the UOC Enforcer, which seems to further improve performance, at least on my machine. The UOC Enforcer is now is required in order to fully enjoy the optimizations introduced by the new version. So, do not forget to install both the UOC Patch and the Enforcer! An explanation on how to install the UOC Enforcer is written below, right in this post. Build number is N2H.


A brief introduction

I'm writing this thread because I would like to share with you an experiment I made as a result of two years of using an old, single core system (an overclocked Pentium III-S Tualatin 1.4GHz) with the modern web. As you all know, the most versatile and useful web browser to use for old machines, especially XP ones, is Mozilla Firefox, thanks to its customizability, the numerous forks that it spawned and the built in certificates manager that makes things easier if we want to connect old computers to the internet.

This thread focuses specifically on Roytam1's browsers for Windows XP, such as New Moon 27 SSE and Firefox 45 ESR SSE, because they are the ones I use on my Pentium III system and the ones I used as a base to develop my "patch". We know that old computers, especially if single core or SSE only systems, can struggle a bit with the stock versions of these browsers, because they are quite resource intensive, and so the experience is quite limited unless you have an hardware that is capable enough to run the browser comfortably.

So, a year ago, back when my Tualatin was still a 800Mhz Coppermine system, I started delving into the about:config of Pale Moon first, and New Moon later, in order to reduce as much CPU and RAM consumption as possible. Had to do several trials and errors, but in the end, I finally managed to get improvements in responsiveness and overall speed on the browser and so, after six revisions, I officially want to release the UOC Patch, my personal attempt, inspired by the community and by my experience of using an old computer as a daily driver, at making web browsing with Firefox and derivatives a much more enjoyable experience.

Ok ok, good. So what's the UOC Patch?

The UOC Patch (shortened form of Ultra One Core Patch) is a custom Global Preferences file available for any Mozilla based browser that uses the codebase of Firefox 38 ESR (such as Pale Moon and Roytam1's New Moon) or Firefox 45 ESR (i.e. Firefox 45 ESR SSE always by Roytam1), that is aimed at optimizing the browser to run on old machines and to consume less resources.

Bear in mind that I developed the UOC Patch for my machine, which used to be a 800Mhz Coppermine and now is an overclocked 1.4GHz Tualatin, so it might perform differently on yours, but it should bring some improvement in terms of speed.

The UOC Patch is a Defaults Override file, meaning that it goes in the following directory "C:\Program Files\{Your Mozilla based browser}\Defaults\Pref\".

As soon as you put the patch into the "Pref" folder, the default about:config parameters will be replaced by the ones of the patch, unless you have modified the same parameters. If so, you can switch to the UOC Patch parameters by simply resetting them in the about:config.

(If you feel adventurous, you can even open the patch with your favourite text editor, replace the "Pref(" parameter with "user_pref(" and embed it in your Prefs.js file, but this method might be cumbersome for beginners.)

The requirements? Surely it has them.

Well, yeah. The UOC Patch requires at least a DirectX 9 capable graphics card. Even though it will work on a DirectX 8 card, I don't have one I can use to test it so it's pretty much untested. I tested the patch with a Geforce FX5500, an FX5600, a 6800GT and an ATI Radeon HD3850 and my current graphics card, an X1950 Pro, and the patch speeds up the browser as it should. Then, ideally, the CPU. A 800MHz CPU and higher can give you a better experience, again, I don't know how it does perform on a slower CPU. RAM wise, any system that can run New Moon 27 and derivatives or Firefox 45 ESR SSE will support the UOC Patch without issues. So, to recap, you need:

    -A DirectX 9 capable graphics card with at least a 128 bit buss
    -A 800MHz CPU or faster for better performance
    -768MB of RAM or more (I don't have a machine with less RAM to test it)

Ok now that we know the specs, how to install it?

Installing the UOC Patch is a very easy process. Just go in your browser folder (C:\Program Files\Mozilla Firefox or Pale Moon or any other Mozilla based browser you use), then go in the "Defaults" then the "Pref" folder and extract the UOC_Patch38.js or UOC_Patch45.js you will find in their respective archive in the above folder and start the browser. The UOC Patch will be automatically applied alongside your existing preferences. But as a safety measure, do make a backup of your prefs.js file inside your profile folder, before launching the patched browser.

In order to access your profile folder, you must make sure that the hidden folders are visible (if not, you must go in the Control Panel, then choose Folder Options, and tick the box that says "Show Hidden Folders"), then navigate to your Firefox/New Moon/Mozilla browser profile folder (i.e. C:\Documents and Settings\{Your Username}\Application Data\Mozilla\Firefox\Profiles\{Your Profile Folder}), you will find a file called "prefs.js". Make a copy of the file and rename it to "prefs.bak" to back it up.

Enough with the words! I want to download it!

Okay, okay. There you go. These are the download links for the UOC Patch. Remember, you must not absolutely use the UOC Patch for a particular codebase with a browser that uses a different one. You might experience issues. These two versions are conceived for the Firefox 38 ESR and 45 ESR codebases, so any fork of Firefox that uses those codebases, will work with their respective version of the patch. Choose carefully.

For Firefox 38 ESR based browsers (i.e. New Moon 27): Click Here

For 38 ESR-based Macintosh browsers (i.e. TenFourFox, Arctic Fox): Click Here

For Firefox 45 ESR SSE and 45 ESR based browsers: Click Here


Introducing the UOC Enforcer

The UOC Enforcer is a custom "user.js" file that acts as an add-on for the UOC Patch and must be placed into the browser's profile folder and tells the browser to change the "stubborn" entries in the about:config that are hardcoded by the developer, making the UOC Patch work even better.

In order to install the UOC Enforcer, you must put the user.js file into your Firefox/New Moon/Pale Moon/Sea Monkey profile folder, that you can usually find at
C:\Documents and Settings\User\Application Data\{Your Browser}\{Browser Name}\{Profile Folder} on XP and at
C:\Users\{Username}\AppData\Roaming\{Your Browser}\{Browser Name}\{Profile Folder} on Vista and 7.

You must remember though that the UOC Enforcer doesn't let you change the edits from the about:config, so if you want to change a "stubborn" entry, you must edit the user.js file directly (you can do it with Notepad).

UOC Enforcer for Firefox 38 ESR based browsers (i.e. New Moon 27, Seamonkey, K-Meleon): Click Here

UOC Enforcer for Firefox 45 ESR based browsers (i.e. Firefox 45 ESR SSE and upwards): Click Here



A Final Note

Please, by all means, test the patch on as many systems as possible! The more the configurations, the better will be. Due to space constraints and lack of money, I don't have access to different systems I can test the patch with, and my Tualatin is the computer I used as a testbed for its development and so, I made it focusing on the hardware I had and currently have. The UOC Patch is not strictly limited to single core systems, but it can be used on any old and slow computer that runs Roytam1's Mozilla forks, it would be interesting to see if it can bring some benefits even on faster systems, or even slower ones: I don't have a Pentium II or an AMD/Intel Socket 7 system to test the patch with, otherwise I would have tried it on those too. The UOC Patch has not been tested on K-Meleon and SeaMonkey, but mostly because I'm still experimenting with those and so if you want to try it on those browsers, it's entirely up to you.

There are some extensions I heartedly recommend to use alongside the UOC Patch to make the experience much better. These are:

    -NoScript (I recommend v2.6.9.32 or v2.6.9.27 for New Moon, and v2.9.0.1 RC1 for Firefox 45 ESR SSE)
    -Decentraleyes 1.4.2
    -Bluhell Firewall 2.5.3
    -UAControl 0.1.3.1.1 (To change the user agent on the fly, per website)
    -uBlock Origin 1.10.0
    -Vacuum Places Improved 1.2.1
And this one is optional, Youtube 2 Player (also known as YT2Player), a nifty plugin that turns Youtube links into redirects to VLC, so whenever you click on a Youtube link, the video will be loaded automatically in VLC, thus saving resources and CPU cycles.

Okay, that's all folks. Now if you want to throw rocks or tomatoes or veggies at me, feel free to do so. I developed this in my free time with a desire of curiosity and experimentation, to see if I can push my old machine to its extreme limit, and so far, at least personally, I'm quite satisfied. But as always, it's up to you to judge whether the UOC Patch is actually useful for your system, or it's an utter piece of garbage. Be aware I'm not responsible of any pandemy, nuclear warfare, space/time continuum and so on caused by your system. I upload the UOC Patch for experimental purposes, and it's provided AS IS. Happy RDD'ing!
Last edited by looking4awayout on 2019-10-13 @ 13:05, edited 10 times in total.
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-6-18 @ 16:38

*UPDATE!*

I have disabled two non essential options regarding the management of SVG layers: svg.display-lists.hit-testing.enabled and svg.marker-improvements.enabled. They seem to improve the browser's responsiveness and apparently don't affect the way sites behave. Archive build is n2d. Please update and remember that the UOC Patch is supplied AS IS. Thank you!
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-7-11 @ 14:30

*UPDATE!*

After some weeks of intense development, I have finally released the new version of the UOC Patch, build number is N2F.

Compared to the previous version, this new one has been reworked almost entirely: many entries that point to my FF45 ESR SSE installation have been removed, shaving the size down to around 25KBs, making it even easier to fit in a floppy disk (3.5" or 5.25", your choice, for easier portability), but I've also reworked the loading routine of webpages, disabling the asynchronous panning and zoom feature, which instead of offloading the CPU, it is somehow bugged even on 45 ESR based browsers, causing an excessive spike in the CPU usage. Also, scrolling webpages while they are loading images should be smoother now, at least it is on my Tualatin RDD. I've also increased the memory cap of Javascript processes to 96MB, which seems the sweet spot between usability and performance, at least on my machine.

But the biggest news is the introduction of the UOC Enforcer. The UOC Enforcer is a custom "user.js" file that must be placed into the browser's profile folder and that tells the browser to change the "stubborn" entries in the about:config that are hardcoded by the developer, making the UOC Patch work even better. You must remember though that the UOC Enforcer doesn't let you change the edits from the about:config, so if you want to change a "stubborn" entry, you must edit the user.js file directly (you can do it with Notepad).

Therefore, I strongly suggest you to open the UOC Enforcer file and check out what are the stubborn settings, in case you want to change them in future. Most likely, you won't need to do that. While the Enforcer is optional, I strongly recommend it in order to get a better experience with the UOC Patch, as it tweaks the browser further.

Another good news: after getting a semi-vintage Mac Mini from 2006 running System 10.6.8 "Snow Leopard", I've been able to port the UOC Patch to the Macintosh. Installing the patch is as simple as doing it on Windows. You just unzip the patch and put the UOC_Patch_Mac.js file into the following folder:

Applications\[Browser folder]\Contents\Resources\Defaults\Pref

The UOC Enforcer for 38 ESR browsers is the version that must be used with the Macintosh one. You can install the Enforcer on the Macintosh by putting the user.js file in the following directory:

Macintosh HDD\Users\[Username]\Library\Application Support\[Browser Name]\Profiles\[Profile Name]\

In this way, you will have the UOC Patch + the Enforcer fully working even on your old Macintosh. Just like the Windows version, please test it on as many platforms as possible! I'm particularly interested to know how it performs on a PowerPC Macintosh, G4 and G5, and I'm curious to know how it would run on a G3 Power Macintosh (both the original iMac, the eMac and the beige G3 models), maybe it could even work with Classilla.

You can download the updated version of the UOC Patch and the UOC Enforcer in the main post.

The patch is offered AS IS, and to the people who still haven't updated the Windows version, please do it now and do not forget to try the UOC Enforcer alongside the Patch, for better performance!
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby cde » 2019-7-11 @ 14:35

This is some awesome work! I will try it with my Debian-based "iceweasel" (a Firefox rebrand) and let you know :-)
cde
Newbie
 
Posts: 75
Joined: 2018-7-19 @ 11:48

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-7-11 @ 14:39

Great! In your case though I think you should use the Macintosh version, because the standard version of the patch uses DirectX 9 in order to accelerate the layers. The Macintosh version on the other hand, uses OpenGL, making it more Linux friendly.
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-9-08 @ 22:44

After all this time, I'm finally happy to say that I have fixed the choppy framerate issue with ATI cards* on Mozilla based browsers (including @roytam1's) on resolutions above 800x600.

In order to have an almost NVidia-like smooth scrolling experience, you need to set these three parameters to True in about:config:

layers.enable-tiles - True

layers.tiles.adjust - True

devtools.performance.ui.enable-framerate - True (this one might be already set to True if you use the UOC Patch)

This dramatically improves the framerate if you use an ATI card, so if you have experienced choppy scrolling above 800x600, you might have to check out if setting these three values to True in the about:config, will bring some benefits to your system.

There is another extra value** that you can set to True in order to get better scrolling performance. But it only works on Firefox 45 ESR SSE. I don't have a computer where I can test FF52 ESR based versions and beyond, so use this extra tweak below only on FF45 ESR SSE. Set the value below in this way:

layers.async-pan-zoom.enabled - True

You might also have to tweak the framerate of your browser too, if you experience tearing. You can easily do that by editing the two values below:

layers.offmainthreadcomposition.frame-rate

layout.frame_rate

The UOC Patch sets them to 120, but you might get a better performance at 60 FPS or 240, or 480, your mileage might vary according to your system.


*= DO NOT, and I say do not, attempt to enable tiles with NVidia cards. Or else you will get extremely choppy framerate, rendering your browser unusable unless you edit your prefs.js file to set them back to false. This tweak only works on ATI cards since NVidia cards already run smooth without the tweaks above.

**= DO NOT set this value to True in New Moon 27 and K-Meleon 76 Goanna, or else you will get unexpected 100% CPU spikes and the scrollbars will no longer be visible unless you revert the value to False. I do not guarantee that this extra value will work correctly on your system. If you notice worse performance with layers.async-pan-zoom.enabled, just leave it set to False as per default settings.
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby Caluser2000 » 2019-9-09 @ 03:53

I'm posting vieiwing and posting this on a P166MMX setup using Mozilla 1.7.8 on Xandros 2 linux. Is there a linux port for this I can test out?
User avatar
Caluser2000
Oldbie
 
Posts: 1248
Joined: 2014-10-21 @ 05:34

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-9-09 @ 07:14

While there is not a Linux specific version of the patch (I don't have a computer with Linux), you can use the Macintosh version as it's optimized for OpenGL. Mozilla 1.7.8 is a very old version though, so I doubt it will work properly as the patch makes calls that are featured only in recent versions of Firefox (38 ESR and 45 ESR upwards) but you can give it a try and see if it brings benefits, something I doubt since your MMX doesn't meet the minimum requirements for the patch, but it's worth a try. Let me know how it fares. :)
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-10-06 @ 07:31

UPDATE: New, experimental versions of the UOC Patch and the respective Enforcers are compiled and ready. I have not shared them publicly yet because I need beta testers. This time I have done more extensive changes, mostly in the Enforcer files, so I would need someone who can test the patches and report eventual issues. I have already reported to roytam1 the glitches in K-Meleon Goanna and New Moon 27 (in a lesser way) when tiled compositing is enabled, but I don't know if there might be issues with other machines. So if anybody wants to test the patches with all the browsers (SSE and SSE2 ones), including the Macintosh version (preferably someone who owns both a PowerPC and an Intel Macintosh), please let me know.
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: [Experimental] The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-10-09 @ 16:22

UPDATE!

I have done some reworks on the UOC Patch, removing double entries and some other ones that were not applied by the patch. The default framerate has been increased to 240, as it makes scrolling smoother and the maximum amount of layers has been reduced to 6, which seems to be a good compromise between usability and performance. The fix for choppy scrolling with ATI cards has been implemented in the UOC Enforcer.

Some of the entries that were formerly located in the core UOC Patch have been moved to the UOC Enforcer, that now is required in order to fully enjoy the optimizations introduced by the new version. So, do not forget to install both the UOC Patch and the Enforcer! An explanation on how to install the UOC Enforcer is written in the first post of this thread. Build number is N2G.

The current version of the UOC Patch for Macintosh has been tested on an Intel based Mac Mini 1.1 running System 10.6.8 "Snow Leopard" and using Arctic Fox as a web browser, however it is currently untested on Power Macintosh computers. So, if you have a fast Power Macintosh system (can be either a Power Macintosh AIO G4/G5 or an iBook/ Powerbook G4), please test it and let me know how it runs with TenFourFox. G3 Macintoshes might apply, but I cannot assure how the Patch and the Enforcer would behave on such ancient setups (even though the latest version of the Patch + Enforcer has proven to work very well on a Celeron Mendocino system with 256MB of RAM, Windows 2000 + Extended Kernel and using the onboard Intel Extreme Graphics IGP of the i810 chipset.)

None of the UOC Patch + Enforcer version have been tested on Firefox Quantum. Which is obvious, because if your system can run Firefox Quantum, it means you clearly don't need the UOC Patch and the Enforcer in order to make it run better. Plus, Quantum has many differences from the "classic" versions of Firefox and derivatives, and so, I won't support it.

WARNING: In case you use @roytam1 K-Meleon Goanna as your main browser and you encounter rendering errors and artifacts when you scroll a webpage, open the UOC Enforcer (user.js, located in your K-Meleon Goanna profile folder) and set the following value "layers.enable-tiles" to False.

As always, please update to the latest version, test the Patch and the Enforcer on as many old machines as possible, let me know the outcome. Happy RDDin'!
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-10-13 @ 11:49

UPDATE!

I have done some major reworks to the previous version, as I have found some bugs that for some reason I overlooked. I also have implemented some new entries in the UOC Enforcer. The UOC Enforcer is now is required in order to fully enjoy the optimizations introduced by the new version. So, do not forget to install both the UOC Patch and the Enforcer! An explanation on how to install the UOC Enforcer is written in the main post. Build number is N2H.
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU

Re: The UOC Patch - An attempt at optimizing Mozilla based browsers for old machines

Postby looking4awayout » 2019-10-14 @ 12:33

UPDATE!

I have rewritten both the 38 and 45 ESR versions of the patch and their respective enforcers from scratch. This has allowed me to drastically reduce the file size (around 7kb now, as small as a Commodore 64 game!) and improve the overall responsiveness of the browser. The Macintosh version has been updated as well. Please update!
My Retro Daily Driver: Pentium !!!-S 1.5GHz | 1.5GB PC133 SDRAM | Gecube Radeon X1950 Pro 256MB OC | 500GB WD Blue SSD + 300GB WD Velociraptor | Sound Blaster AWE64 Value | Windows XP Professional SP3
User avatar
looking4awayout
Member
 
Posts: 197
Joined: 2017-8-08 @ 10:48
Location: EU


Return to Software

Who is online

Users browsing this forum: No registered users and 3 guests