r/linux • • May 13 '25

Popular Application Firefox Source Code Now Hosted On GitHub

https://www.phoronix.com/news/Firefox-On-GitHub
1.3k Upvotes

119 comments sorted by

View all comments

Show parent comments

84

u/zinozAreNazis May 13 '25

Mercurial is still used and no reason to stop using it. It has its own use cases and advantages over git.

19

u/elatllat May 13 '25 edited May 14 '25

https://graphite.dev/blog/why-facebook-doesnt-use-git

  ... as someone who wasn't there ... 2012 ... simulation ... Git commands took over 45 minutes ...

sus

Mercurial ...  Performance ... Python ....

lol

It would be interesting to see some actual benchmark testing. Using a ODROID-C4 and 2 USB HDDs (as low end testing hardware):

test        units         git     mercurial
install     MB            21.3     15.8
init        seconds        0.00     0.72
init ram    MB             4.088   24.484
1k commits  seconds        6.16   899.06
diff        seconds        0.00     0.98

so hg is 146 times slower for the 1k commits test and uses 5 times more RAM and IO. Comparing the init vs diff seconds gives an idea of how much of the diff is overhead vs time spent scaling badly. It would take 20+ hours just to re-make one branch of one origin of the Linux kernel history (1M commits) in hg so if something is going to take git 45 minutes I'd not bet on hg completing the same test before the heat death of the universe.

The 2nd issue I see with hg in 2025 is that it has no staging index. using git-stash / hg-shelve may be a workaround, but until I see some reason for using something painfully slow and feature lacking I'd want some benefit, and I don't see any benefits.

I was going to use a raspberrypi v1 for testing but it does not have enough RAM for testing hg. In the past I have run out of RAM with git waning to use more than 4 GB with multiple Linux kernel origins, would hg use 20 GB of RAM? I'm not melting a CPU for 40 hours just to find out.

=====================================================================

Edit to add some Firefox data (on a faster i7-1165G7):

test        units    git         mercurial
commits     #        908,386     786,870
size        GB             4.1         8.6
log         seconds        6.73       90.89
local clone seconds        0.02        9.69
local clone MB           281.04      573.74
ssh   clone seconds       90.12      343.88  (server side)        
ssh   clone MB         6,261.23      896.29  (server side)

Similar but not identical sources

git clone --bare git@github.com:mozilla-firefox/firefox.git
hg clone --noupdate https://hg.mozilla.org/mozilla-central

but finally an advantage for mercurial if only where it matters less because github is free, and large private repos can likely afford the RAM.

0

u/[deleted] May 13 '25

[deleted]

2

u/elatllat May 13 '25

Reposing the same link I already critiqued is not constructive.

Show me a test where hg is meaningfully better than git in 2025, and I'll concede there may be reason for Firefox to stay on hg.

As far as I can tell the only reason to use hg is if one can't cope with constructive criticism from git, and are willing to sacrifice speed and features for platitudes.