Jump to content

The UOC and QUOC Patch - Optimize Firefox (and derivatives) for old hardware!


Recommended Posts

Feel free to donate me something as a sign of appreciation for the UOC Patch and the Enforcer. :)

Click on the "Donate" button to donate with PayPal: btn_donate_SM.gif

 

*UPDATE!*

The UOC Patch has been successfully ported to the Quantum Generation! Experience a quantum leap in performance with the new QUOC Patch, (pronounced Quawk) based on the tried-and-true public N2M release of the classic UOC Patch. The QUOC is aimed exclusively to Firefox Quantum-based browsers, so every browser newer than 52 ESR. I haven't tested it on older versions and so, it might not be compatible with non-Quantum based browsers. The QUOC Patch uses the 45 ESR version of the UOC Enforcer. A new version of the UOC Patch is currently in development, but I cannot give exact release dates.

Users of the SeaMonkey browser, especially version 2.48, can use the 45 ESR version of the Patch.

I recommend you to start with a new and clean profile, in order to get the most out of your patched browser: old and "dirty" profiles might hamper the performance of this new version of the UOC Patch.

QUOC Patch ADDENDUM: There are two keys in the QUOC Patch file that have been commented out. These are: privacy.firstparty.isolate and privacy.trackingprotection.enabled

If you remove the // and the comments, enabling those keys, you will increase the privacy protection in your browser at the expense of some sites not working correctly or some others not displaying thumbnails, such as https://www.geo-ship.com . I have left them disabled in the patch, but you're free to tweak the file and enable them, if you wish. If you use Telegram Web with the QUOC Patch and you experience videos and GIFs not loading, simply set this key dom.caches.enabled to true.

The UOC Enforcer 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 N2M.

UOC-Logo.png

A brief introduction

Hi everybody, 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 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, pronounced "Wok" in its shortened form) 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.

The UOC Patch is not compatible with Firefox Quantum.

Use the new QUOC Patch if you have a Firefox Quantum or a third-party browser based on its codebase.

 

The requirements? Surely it has them.

Well, yeah. The UOC Patch requires at least a DirectX 9.0c 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.0c capable graphics card with at least a 128 bit buss
  • A 800MHz CPU or faster for better performance
  • Enough RAM to support New Moon 27/Firefox 45 ESR SSE and other Roytam1's Mozilla based browsers

 

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.

For K-Meleon users, check out Mathwiz's post below:

What about the Macintosh?

Installing the patch on the Macintosh 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 for Macintosh and the Enforcer (38 ESR version) up and running on your Macintosh system as well.

 

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. The new QUOC Patch, on the other hand, is conceived for Firefox Quantum and all the other browsers that use its codebase, including the latest version of Firefox itself, so, it's meant for those old and low-spec machines that can (poorly) run stock Firefox Quantum and forks. Choose carefully.

QUOC Patch for Firefox Quantum based browsers (i.e. the latest version): Click Here

QUOC Patch GL for OpenGL systems (i.e. Linux, Macintosh): Click Here

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

UOC Patch for 38 ESR-based Macintosh and Linux browsers (i.e. Arctic Fox, Iceweasel 38): Click Here

UOC Patch for Firefox 45 ESR based browsers (not compatible with Quantum): Click Here

UOC Patch for Firefox 52 ESR* based browsers and upwards (not compatible with Quantum): Click Here

PowerUOC Patch for TenFourFox: Click Here

 

Introducing the UOC Enforcer

UPDATE: The UOC Enforcer is now required if you want to enjoy the full optimizations for your old machine.

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 above.

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 in your profile folder (you can do it with Notepad).

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

UOC Enforcer for Firefox 45 ESR and 52 ESR based browsers and upwards (i.e. Firefox 45 ESR SSE, SeaMonkey, Basilisk/Serpent and upwards. QUOC Patch compatible): 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. 

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.9 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

And this one is optional, Youtube 2 Player, 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!

 

*: I do not recommend people to use Firefox 52 ESR based browsers (Serpent/Basilisk/Pale Moon 28/New Moon 28) on old computers, because the Mozilla developers have broken tiled compositing and nobody has ever bothered to fix that issue. So, if you want better performance with the UOC Patch, use Firefox 45 ESR SSE (which I recommend), New Moon 27, SeaMonkey (with the 52 ESR version of the UOC Patch) or K-Meleon Goanna. Particularly, I recommend Firefox 45 ESR SSE because it has fully working implementations of tiled compositing and APZ. the latter broken on Goanna based browsers. SeaMonkey uses the 52 ESR version of the UOC Patch due to a broken implementation of APZ.

Edited by looking4awayout
Introduced the OpenGL version of the QUOC Patch.
Link to comment
Share on other sites


Thanks @looking4awayout! The FF 45 prefs should work with newer forks (NM 28/Serpent), although those require SSE2 and are thus probably running on faster processors so you may not notice as much difference in performance.

Folks, if you already have prefs set that you don't want to lose/reenter manually, you'll have to merge his prefs.js files with yours thusly:

  1. Open your browser's profile folder (go to about:profiles and on the active profile, click "Open Folder")
  2. Close your browser.
  3. Open @looking4awayout's prefs.js in a text editor such as notepad.
  4. Select all the prefs and copy them to the clipboard.
  5. Open the prefs.js in your browser's profile folder in a text editor.
  6. Paste in the copied prefs right after the comments at the beginning of the file.
  7. Save the merged prefs.js file.
  8. Reopen your browser. If there are any duplicate/conflicting prefs, your settings should take priority; everything else will come from @looking4awayout's file.
  9. Next time you close your browser, prefs.js will be rewritten with all prefs in order.
Link to comment
Share on other sites

Just a little tip for a better installation way, because I feel you're not very aware how prefs.js works. For example this file only contains user prefs if they are different from default. All other lines (matching default) are automatically deleted by the engine.

instead of profile/prefs.js, it has advantages to put the file instead in browser/defaults/preferences/looking4awayout.js or UOCpatch.js
The syntax is the same except it's only "pref()" not "user_pref()", example
pref("zoom.defaultPercent", 100);

The advantages are
- you can keep those settings together in one place, the lines inside never vanish, and you can easily look it up later (Ah that was a uoc-pref...)
- all settings in the defaults folder are automatically "default" prefs (of course, users should remember this!)
- you can write comments inside, because the browser only reads default files, never writes inside
- default also means, unlike prefs.js, the lines don't vanish in nirwana as soon as you toggle something to the default value. A toggled value, if non-default, just becomes a "user setting", which means it's now written into prefs.js. To restore original UOC, you can just right-click prefs in about:config and reset them to 'default' again (as defined in your file). Resetting to default will also delete the line in prefs.js

Another possibility:
adding the file contents inside profile/user.js
Then it doesn't mess with default settings for all profiles, only affects the current profile.
An important difference: profile.../user.js contains startup prefs. Users can toggle them during a session, by menu or in about:config etc, but at next browser start user.js values will get imported into prefs.js and become active again.

A little trick about prefs.js:
if entries were manually changed with a text editor, and there are duplicate lines, the browser will clean it up automatically at next startup. The later lines 'win'. That means: instead of replacing prefs.js completely, you can just paste a whole block of new prefs at the end of it (while the browser is closed!) Then all previous user prefs, if they were NOT duplicated in the new block, are not lost but will survive.

PS: If you try K-Meleon-Goanna, highly recommand to download macro "useragents2018.kmm", instead of installing any conflicting header/UA addons/extensions. Unlike them, this macro only toggles prefs, nothing else. The UA spoofing itself is done by the native engine.

Edited by siria
Link to comment
Share on other sites

@Mathwiz You're very welcome! 

I encourage you all to test the UOC Patch on different versions and forks of Firefox and different hardware. I'm curious to see how the "patched" browser can fare on different platforms besides the one I used to developed it. Unfortunately I'm not a programmer, otherwise I would have developed an installer for it, to make the installation easier for less expert users. I look forward to read the feedbacks!

@siria That's cool! Thank you for the tip :)

So for example, I can rename the prefs.js of the UOC patch into "UOC_Patch.js" and put it into the browser/default/preferences/ folder and it will work? You guessed right, I'm by no means a programmer or an expert of how Mozilla works, but I'm confident with the help of the community we can make something nice and useful, which is why I put the [Experimental] tag on the thread title. :D

Edited by looking4awayout
Link to comment
Share on other sites

looking4awayout said:


So for example, I can rename the prefs.js of the UOC patch into "UOC_Patch.js" and put it into the browser/default/preferences/ folder and it will work?



Yes absolutely (just rename inside user_pref to pref) but important to understand:
- prefs.js (and user.js) are USER values, stuff inside always has priority over default values
- but prefs.js only contains prefs that are NOT default (or would contain 2000 lines)
- after changing default values by adding this file, if prefs.js did already contain the same setting (user set), it will now be considered 'default' and the line vanish inside prefs.js

Very easy and safe to test: if you make a backup of prefs.js
Then just add your new defaults file in preferences folder and restart.

For testing, it could contain anything, your real contents, and/or for example:
pref("permissions.default.subdocument", 1);
pref("permissions.default.subdocument__INFO", "INFO: 1=load all iframes / 2=block iframes / 3=same domain");
(that pref and siblings are global default values, working natively, but probably conflicting with certain addons for the same stuff)

PS: I'm not a programmer either, far from it (except KM macros), just also a user who loves customizing ;-) And find this basic pref knowledge far too unknown, which is a major pity. Heard of that stuff myself far too late, only after years of having missed especially startup prefs - while it would have been so easy since decades already. Just didn't know until some day stumbling about it accidentally, sigh.

And not sure if you're interested, perhaps for comparing notes, but actually such projects (optimized pref collections) are posted from time to time in various forums, or blogs like ghacks.Everyone has a slightly different approach, most focussing on speed, or privacy, and guess yours adds a new twist - old machines.
Link to comment
Share on other sites

EDIT: I've followed @siria's suggestion and updated the UOC Patch in order to not interfere with custom prefs.js file. Now the Patch is no longer a prefs.js that must replace the old one, instead it should be put into the "\Defaults\Pref\" folder that you usually find inside every Mozilla based main folder. This way you don't risk to lose your custom settings of your prefs.js file. Thanks, Siria! :D

Edited by looking4awayout
Minor grammar fix
Link to comment
Share on other sites

@DestroIt's just because according to the about:config, the maximum performance with hardware acceleration can be reached only with a D3D9 compatible card or an OpenGL one, but as I do not have a D3D8 graphics card, I cannot test it in that configuration. Perhaps the acceleration works even with those cards.

Keep in mind that now the UOC Patch goes in the Defaults\Pref\ folder and so it overrides the default parameters of the about:config, unless for some reasons you have already edited those. A friend of mine long ago tested an earlier version of the patch with a Matrox Parhelia and an 800MHz Celeron Coppermine, and the performance was better than stock, but he never said how much better it was. Let me know how it goes with your pc. :)

Edited by looking4awayout
Link to comment
Share on other sites

I've never used 45 ESR SSE cause processor (despite older) support SSE2.

Well, i'm trying the Roytam1 (firefox-45.9.15-20190330-449d61309-win32-sse.7z) and i can see a huge speed improvement also without patch :) 

I know that 45ESR SSE can have compatibility issue with sereval web pages and plugins, but for the less ram consume seems to be on increased system .

Edited by Vistaboy
Link to comment
Share on other sites

I like 45 ESR SSE a lot, much better than the regular 45 version, plus it natively supports WebP images, which is nice, that and New Moon 27 SSE are my two favourite browsers on my PC. Of course, in my case I need to use the UOC Patch as my computer is quite old (it's a Pentium III after all :P ), of course the patch is meant for very old systems such as Pentium IIIs, Athlon XPs (maybe Athlon Classics too?), early Pentium 4s and newer low end systems that struggle with the base, unoptimized browsers. Your system is apparently capable enough to run without needing the UOC Patch.

While the patch is conceived for Roytam1's browsers I mentioned in the OP, it can be used even with other versions of Firefox. I tested the 45 ESR UOC Patch on Firefox 41 up to 48 and it works as it should. Of course, I cannot test it on newer versions such as 52 ESR as it requires SSE2, but at that point, it should not be necessary unless the system is an old SSE2 one, or it's slow or a low end one. The 38ESR UOC Patch also works with regular Firefox 38.

Edited by looking4awayout
Link to comment
Share on other sites

Hi,

Quote

pref("browser.search.countryCode", "IT");
pref("browser.search.region", "IT");

this is an international forum.

Quote

pref("extensions.https_everywhere._observatory.use_custom_proxy", true);
pref("extensions.https_everywhere.firstrun_context_menu", false);
pref("extensions.https_everywhere.prefs_version", 1);
pref("extensions.https_everywhere.rule_toggle.WhatsApp.com", false);
pref("extensions.https_everywhere.toolbar_hint_shown", true);

Why insert line with extensions not recommended?

The above is just one example.

I wish my countryman a good job.:hello:

Edited by Sampei.Nihira
Link to comment
Share on other sites

I removed these two prefs from my copy:

pref("browser.newtab.url", "about:blank");
pref("browser.newtabpage.enabled", false);

These prefs cause new tabs to open with a blank page instead of thumbnails of recently-opened pages. If, like me, you prefer the thumbnails, you can remove these prefs from your copy too.

Link to comment
Share on other sites

Nice to see you are tailoring the UOC Patch to your needs! :) 

It's not a patch set in stone. Of course the way I made it is mostly to squeeze as much as I can out of the browser (and maybe there can be even margin for further improvement, if someone with a deeper knowledge of Firefox can investigate), but everyone can edit the patch to suit their needs and taste.

Link to comment
Share on other sites

UPDATED! I have done some reworks and bugfixes on both versions. I've increased the initial paint delay for webpages, in order to make them more responsive while they load. I had to re-enable service workers because they break Mediafire. Please test the patch, and as always, it is provided AS IS. Thanks!

Edited by looking4awayout
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...