Open-Source Wikis

/

Gecko

/

By the numbers

mozilla/gecko-dev

By the numbers

A quantitative snapshot of the mozilla/gecko-dev mirror. Data collected on 2026-04-30 from the local clone at the current master HEAD (5836a062726f).

Size

gecko-dev is one of the largest open-source codebases in existence. Approximate scale:

Top-level directory Approx. file count (3 levels deep)
layout/ 19,000+
dom/ 11,800+
gfx/ 2,100+
netwerk/ 2,000+
toolkit/ 1,800+
js/ 1,700+
media/ 1,200+
widget/ 1,100+
browser/ 1,000+
xpcom/ 900+
editor/ 850+
devtools/ 600+
image/ 600+
accessible/ 500+
security/ 450+
intl/ 380+
modules/ 300+
mozglue/ 240+
ipc/ 230+
mfbt/ 230+
remote/ 180+
parser/ 160+
storage/ 160+
services/ 110+
xychart-beta horizontal
    title "Approximate file count (top dirs)"
    x-axis ["services","storage","parser","remote","mfbt","ipc","mozglue","modules","intl","security","accessible","image","devtools","editor","xpcom","browser","widget","media","js","toolkit","netwerk","gfx","dom","layout"]
    y-axis "Files" 0 --> 20000
    bar [110,160,160,180,230,230,240,300,380,450,500,600,600,850,900,1000,1100,1200,1700,1800,2000,2100,11800,19000]

The repository hosts code in C++, JavaScript, Rust, Python, Kotlin/Java (Android), C, IDL (.idl, .webidl, .ipdl), and HTML/XUL/XBL fragments.

Activity

  • Commits since 2024-01-01: ~73,000 (≈1,500/week, ≈300/weekday).
  • Most recent commit on master at snapshot time: 5836a062726f ("Bug 1960567 - remove the last C++ and scriptable APIs to accumulate data to legacy telemetry histograms").

The tip of master here lags slightly behind hg.mozilla.org's mozilla-central because mirroring is asynchronous, but typically by less than an hour.

Bot-attributed commits

A non-trivial fraction of commits in gecko-dev are bot-authored:

  • CLOSED TREE / l10n bumps — automated locale bumps (Bumping Mobile l10n changesets, No Bug - Bumping Mobile l10n changesets r=release a=l10n-bump).
  • Backout bot — automated backouts of patches that broke the tree.
  • TaskCluster decision-task bot activity is reflected in commit messages.

Mozilla also has long-running bots like tag-cinnabar, linux64-rust-bumper, taskcluster-decision-task, coverity-mozilla-build, plus contributor-side bots such as mozreview-bot (legacy), and bot@mozilla.com style commits. The exact percentage varies but is typically in the 5-15% range for any given month.

Note: this is a lower bound on automation. Many automated patches (e.g., test-skipfails, expected.json regenerations) are committed by humans operating tooling, so they don't show up as bot authors.

Languages and code mix (qualitative)

A rough sense from the directory layout and toolchain:

  • C++ dominates the engine: dom/, layout/, gfx/, netwerk/, xpcom/, js/src/, widget/, editor/, media/, accessible/, etc.
  • Rust is concentrated in servo/components/style/, gfx/wr/, netwerk/socket/neqo_glue/, security/manager/ssl/{abridged_certs,osclientcerts,trust_anchors}, toolkit/components/uniffi-bindgen-gecko-js/, and roughly 25 workspace crates listed in Cargo.toml.
  • JavaScript runs the browser chrome (browser/, toolkit/, services/) and the DevTools UI (devtools/client).
  • Python drives the build system (python/mozbuild/, python/mach/, taskcluster/, testing/mozharness/).
  • Kotlin / Java lives under mobile/android/ (GeckoView, Android browser components, Fenix host code).
  • IDL families:
    • .webidl files live throughout dom/ and define Web platform APIs.
    • .idl (XPIDL) files declare XPCOM interfaces, mostly under */idl/ and */public/.
    • .ipdl files declare IPC protocols, throughout ipc/, dom/ipc/, gfx/ipc/, netwerk/ipc/, etc.

Complexity

  • Workspace crates: 25 root Rust crates declared in Cargo.toml. Hundreds more vendored under third_party/rust/.
  • JS dependencies: package.json enumerates ~30 dev tools (eslint plugins, prettier, stylelint, license checker). Mozilla's runtime JS does not use npm packages.
  • Mach commands: dozens of mach_commands.py files across the tree (./mach help prints over 100 commands).
  • TaskCluster surface: taskcluster/kinds/ contains hundreds of task definitions (build, test, perf, l10n, partner repacks, …).

Tests

The test code is enormous. Major harness directories under testing/: mochitest/, marionette/, web-platform/, geckodriver/, mozharness/, gtest/, talos/, raptor/, awsy/, tps/, condprofile/, firefox-ui/, mozbase/. Per-feature tests live next to the implementation (e.g., dom/base/test/, netwerk/test/, layout/reftests/).

Notes on these numbers

  • Counts come from find over the local clone with -maxdepth 3. They include test fixtures, generated files, and binary assets.
  • Commits per week is from git log --since=2024-01-01. The number is dominated by Mozilla CI bots and Phabricator-mediated landings.
  • For richer, audited stats see Mozilla's own code coverage and t3 dashboards.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Gecko wiki | Factory