Waterfox: MozLZ4/JsonLZ4 is a horrible idea. Here's why.

Created on 18 Jun 2019  ·  3Comments  ·  Source: MrAlex94/Waterfox

MozLZ4/JsonLZ4 is a horrible idea. Here's why.

Dear developers of WaterFox, please do not take the following message (originally directed at Mozilla, this is just a copy) as offense, but rather as constructive criticism. I am speaking for thousands of users.
I really, really appreciate WaterFox for maintaining support for legacy add-ons, after Mozilla in 2017 decided to slice off support for most add-ons ever developed for Firefox since the beginning, sold under the euphemism “Quantum”. Many of the legacy add-ons (e.g. MetaRefresh Blocker, CacheViewer, TabMix Plus, more advanced session managers and customization options, extended context menu and extended page loading statistics viewer) have no remade alternative. Mozilla effectively betrayed a huge portion of it's developer community. Firefox Quantum is the Mozilla equivalent to Opera 15,, which ditched PRESTO in favour of Chromium.
But adapting to Mozilla's LZ4 goes against WaterFox'es ethics of being independent from Mozilla.

Source of the following text: https://gist.github.com/ATRescue/e6d4a9005f69a1a701af211d2e5580d5


I am not implying the comperssion algorithm Lz4 is bad. But adding an Lz4 layer to JSON files was a terrible idea by Mozilla.

Since Firefox version 56 (which is the last non-quantum version of Firefox), the session files in the 📁 sessionstore-backups directory are no longer recovery.bak and recovery.json, but recovery.baklz4 and recovery.jsonlz4. They should have called it recovery.bak.lz4 and recovery.json.lz4, which would be more logical file names, but they should not have done it in first place. Also the folders 📁bookmarkbackups 📁crashes/store.json.mozlz4 📁datareporting is affected (intoxicated) by Lƶ4.

“If it isn't broken, don't ‘fix’ it” does not apply to everything (e.g. when improving something), but to this one, it certainly does apply.

Previously, Firefox session backups were stored in plain text (just like places.sqlite). But Firefox 56, released on 20170612, added LZ4 bulk, that made recovering lost sessions harder and more time-consuming to me. Some tools that were supposed to decode LZ4 did not work.

There is a lz4 scrounger by a GitHub user called Jscher2000 (Jefferson Scher), which is supposed to turn the “LZ4” information into plain text, but that one does not work properly and crashes the opened browser tab it is running inside.

At least, LZ4 does not erase information without warning like Google Chrome/Chromium did with Version 37 (20140905): removing ArchivedHistory file.

Comparison

Semi-Advantages of LZ4

  • Slightly saves some disk space storage.

    • How much does it save? 10 MB? Are we in 1990?! 100MB? Are we in 2000? Even if plain text files instead of cost me 1 GB, I'd rather have 1 GB of disk storage reserved for it instead of LZ4 garbage. And modern file systems (including ext2, ext3, ext4, btrFS, NTFS, ZFS) offer transparent compression functionality. We are in 2019. Why not compress browser cache altogether? Invalid upside.

    • Save ⭐🌟10 seconds(!)🌟⭐ when doing a backup of the .mozilla or profile folder. Hooray! ̶A̶̶w̶̶e̶̶s̶̶o̶̶m̶̶e̶!

LZ4 Disadvantages

LZ4's disadvantages outweigh the (nearly non-existent) advantages.

When web-searching “LZ4”, the reasons for why only negative things and complaints come up is obvious. LZ4 was an unnecessary misstep exactly nobody asked for.
Where are those people who praise LZ4? Exactly. In LimboLand.

  • Incompatible to all previous Firefox versions.

    • Firefox ≥56 is also not backwards-compatible to the plain-text format.

  • MUCH Harder to find retreive information from damaged media. ( https://support.mozilla.org/questions/1251399 )
  • Unsuitable for text/JSON editors.
  • More CPU usage (although marginial. LZ4 is efficient and fast, but not as much as plain text).

verdict

As you can see, LZ4 only creates headaches, trouble and issues. It is the exact opposite of innovation.
There is absolutely no need for LZ4.
It does more harm than good.

Suggestion for Mozilla

Please create a Twitter poll to make people vote whether they believe LZ4 is a good idea or pure plain text.
(…only if you care about your community, of course.)

All 3 comments

951

this change was intended to minimize ssd writes, your opinion is irrelevant.

Just as a matter of personal opinion @Squall-Leonhart...

I understand your message but, you could have chosen a more tasteful way for your statement.

Personally, the opinion of @ATRescue and anyone else is relevant but, the topic of this issue is just a Mute Point as @grahamperrin had already provided some guidance within another issue topic to, hopefully, help clarify this much better.

I always feel that it's not as much what you state rather than how you state it. I hope that @MrAlex94 agrees with this as well.

This is only my personal opinion and I'm not the Verbiage Police... LOL! :-)

~Ibuprophen

Was this page helpful?
0 / 5 - 0 ratings