We’re excited to announce an improvement for our Linux users that enhances both performance and compatibility with various Linux distributions. Switching to .tar.xz Packaging for Linux Builds In our ongoing ...
Most normal users do not do this. But there might be special packages with special setups, like scripts downloading and installing from Mozillas download links. Or package creators themselves might use it. Or maybe you are a developer, in which case such direct downloads would be helpful for testing and comparing stuff. I also assume most people do not care or notice any difference with this change. Still its an improvement without much drawback and thats always good, even if its only a few people benefiting of it.
And sometimes -bin AUR packages (and of course some normal packages, behind the scenes) use those packages as base. Even though I prefer normal or -git packages.
I use the flatpak on Fedora but have used the tar version in the past because the package managed version is hijacked with stupid Redhat bookmarks and homepage that loves to return after being removed randomly.
The .tar.xz format decompresses more than twice as fast as .tar.bz2, allowing you to get up and running in no time
$ time tar xjf firefox-134.0b3.tar.bz2
real 0m9.045s
user 0m8.839s
sys 0m0.450s
$ time tar xJf firefox-135.0a1.en-US.linux-x86_64.tar.xz
real 0m4.903s
user 0m4.677s
sys 0m0.510s
Nice! Presumably it'd be twice as fast if disk was infinitely fast or something. Unfortunately by testing this I've already used up a hundred times more time than I'll ever save as a result of it.
I am curious too. You tested two different versions, one beta and the other current nightly (different content). It's okay for a quick test, but you can actually have a much closer test. Both nightly and only one day difference:
I run this quick test multiple times and on average these are typical results (don't forget to delete the unpacked folder between each runs):
$ time tar xjf firefox-135.0a1.en-US.linux-x86_64.tar.bz2
real 0m5,784s
user 0m5,700s
sys 0m0,371s
$ time tar xJf firefox-135.0a1.en-US.linux-x86_64.tar.xz
real 0m1,699s
user 0m1,621s
sys 0m0,315s
On my system that consistently gets results around 10s and 5s so the difference is sort of interesting. Mine's a Ryzen 3600, maybe newer CPU features are of substantial benefit to xz.
I think the "etc" shows how f***ed up it might be to package for every single distro. Releasing a tar with no extra bloat and letting each community doing its own things over it is probably one of the best approaches?
But it makes finding a properly functioning official package more difficult for newer users, and really the etc. was superfluous. You only really need .deb, .rpm, and whatever arch uses. There is a flatpak, but it doesn't work properly.
I think, you've answered your own question? There's a lot of different formats for Linux. Getting them all correct and working on the different distributions is significantly trickier than just bundling a self-contained archive.
Interesting, I always assumed they would be using a pretty optimal algorithm with their .tar.bz2 format, because they obviously benefit quite a bit from smaller downloads. Good to know that .tar.xz is actually better.
XZ is quite slow for compression when single threaded. When run in parallel it uses a significant amount of RAM. It creates some of the smallest files and is fast to decompress compared to other well-compressed alternatives.
My point is that it had an overworked maintainer who was easily persuaded into giving the project to someone else. I highly doubt it has gotten a solid team behind it now.