# Electron builder Mac build slow? We timed four runs

> Our two-architecture electron-builder Mac build took about 7 minutes cold and 3 warm. The gap was two Electron zips; the arm64 app was done 20 seconds early.

Source: https://mosaicbrowser.com/blog/electron-mac-build-seven-minutes

## Seven minutes cold, three warm: timing a two-architecture Mac build

Our two-architecture electron-builder Mac build took about 7 minutes cold and 3 warm. The gap was two Electron zips; the arm64 app was done 20 seconds early.

![7 min: Seven minutes cold, three warm, measured four times, beside a screenshot: mosaic settings showing the installed Tesseract Chrome engine and its version](https://mosaicbrowser.com/covers/electron-mac-build-seven-minutes.webp)

On our Apple Silicon Mac, `npm run dist:mac` took about 7 minutes on its first run of a session and about 3 on every run after. We timed four consecutive runs on 11 October 2026. The extra four minutes on the first run were electron-builder downloading the Electron zip once per architecture, which it then caches. And the build we were waiting for, the arm64 `.app` we install on that machine, was finished about 20 seconds before the x64 DMG that ends the command.

## Why we timed it at all

Our engine's documentation once said a Chromium build took six hours. Nobody had timed it, and the figure stopped an experiment for days. When we finally measured, a near-full engine rebuild was 93 minutes and one change to the engine was 1 to 2. The app had no numbers written down at all, and we rebuilt and reinstalled it five times the day we measured. So we wrote the numbers down.

The figures from that day:

```
npm run build (checks + electron-vite)        ~40 seconds
npm run dist:mac, first run of the session    ~7 minutes
npm run dist:mac, warm                        ~3 minutes

```

`npm run build` is our own checks plus the electron-vite compile. `dist:mac` runs that, then hands the output to electron-builder, which is where the time goes.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Fingerprints set inside the browser](https://mosaicbrowser.com/features/engine)

## Why an electron-builder Mac build is slow the first time

electron-builder does not compile Electron. It downloads a prebuilt Electron for each platform and architecture it is asked for, unpacks it, copies your app into it, and packs the result. The downloads land in `~/Library/Caches/electron/`. Ours holds, as of 3 November 2026, the Electron 44.3.0 zips for both Mac architectures:

```
electron-v44.3.0-darwin-arm64.zip   129,788,539 bytes
electron-v44.3.0-darwin-x64.zip     134,127,733 bytes

```

Two files of that size, about 264 MB together today, are fetched on a cold run before any packaging starts. On a warm run both are already there, and the download costs nothing.

If your Mac build is slow on every run rather than only the first, check whether that folder survives between runs. A CI job on a fresh machine is always a cold run unless the cache is restored, and a clean script that wipes caches turns every local build into one too.

## Two architectures, on purpose

Our `electron-builder.yml` names both architectures for both Mac targets:

```
mac:
  target:
    - target: dmg
      arch: [arm64, x64]
    - target: zip
      arch: [arm64, x64]

```

It did not always. With no `arch` given, electron-builder builds for the architecture of the machine running it. Every release built on our Apple Silicon Mac shipped arm64 only, including a Windows installer named `Mosaic-Setup-0.1.0-arm64.exe`, built for an architecture almost no Windows PC runs. Naming the list is the only way the output stays the same whichever machine builds it.

So a warm `dist:mac` packs four Mac artifacts: a DMG and a zip for each architecture. The zips are what the app's own updater downloads. The DMGs are what a person opens.

## Time the step you are waiting on

The command ends when its last artifact is written, and on our machine that is the x64 DMG. The arm64 bundle in `release/mac-arm64/Mosaic.app` exists about 20 seconds earlier. On an Apple Silicon Mac that bundle is the one you install, so "how long does the build take" and "how long until I can test my change" are different numbers, and only the second one decides how often you are willing to rebuild.

Installing is a `cp -R` over `/Applications/Mosaic.app`. Every profile lives in `~/Library/Application Support/mosaic`, apart from the bundle, so replacing the app touches no profile. That is the same separation [local-first](https://mosaicbrowser.com/features/local-first) describes from the user's side.

## What these numbers do not cover

These figures predate steps `dist:mac` has since gained: an engine-staging step before electron-builder runs, and, for a release, Developer ID signing and Apple's check. We have not re-timed the build with them in it, so we are not going to guess at a new number here. The public installer carries no browser; Mosaic downloads its engine, Tesseract Chrome, once, right after you sign in. The engine itself is built separately and not on every app build; why we keep our own Chromium at all is in [why we built our own Chromium](https://mosaicbrowser.com/blog/why-we-built-our-own-chromium), and what ships inside the app is on the [engine page](https://mosaicbrowser.com/features/engine).

The habit is the part that carries over. Before ruling out an experiment as too slow, time it. [The control that settles "is it our changes?"](https://mosaicbrowser.com/blog/the-control-is-googles-build) took one 90-second run, and it would have settled on the first day a question we then spent four days on.

## Questions

### Why is electron-builder slow on the first Mac build?

Usually because it is downloading Electron. electron-builder fetches the prebuilt Electron zip for each architecture it targets, about 130 MB each for macOS, and caches them under ~/Library/Caches/electron. On our machine that download was the whole difference between a 7-minute first run and a 3-minute second one.

### Does building both arm64 and x64 double the build time?

It adds packaging, not compiling. The app code is compiled once; electron-builder then copies, signs and packs a bundle, a DMG and a zip per architecture. On our runs the arm64 app was finished about 20 seconds before the x64 DMG that ended the build.

### How do I make electron-builder faster on CI?

Keep the Electron download cache between runs, so each job is a warm build rather than a cold one, and build only the targets that job needs. On our machine the download was about four of the seven cold minutes.

### Does reinstalling a Mac app this way touch its data?

Not for Mosaic. Installing is a copy over /Applications/Mosaic.app, and profiles live in ~/Library/Application Support/mosaic, so replacing the bundle leaves every profile where it was.

## Related

[The control that settles "is it our changes?"](https://mosaicbrowser.com/blog/the-control-is-googles-build): An unchanged Chrome for Testing got the same IPHey verdict as our engine, so our changes were not the cause. Its voice list still differs from Chrome's.

[Why we built our own Chromium instead of injecting JavaScript](https://mosaicbrowser.com/blog/why-we-built-our-own-chromium): Mosaic changes fingerprint values inside its own engine. Three measured differences between Chrome and plain Chromium explain why that matters.

[An anti-detect browser with its own Chromium engine](https://mosaicbrowser.com/features/engine): Mosaic is an anti-detect browser with its own Chromium engine, Tesseract Chrome: stock Chromium source, with fingerprint values changed inside the engine.

[Local first: your profiles stay on your computer](https://mosaicbrowser.com/features/local-first): Mosaic has no cloud copy of your profiles. Profiles, cookies and proxies stay on your computer, encrypted on disk, with app lock, daily backups and a trash.









[Canvas noise is a function of colour, not place](https://mosaicbrowser.com/blog/canvas-noise-by-colour): Canvas noise consistent across reads has to key on colour: keyed on position, one drawing at two offsets differed by 76 bytes. Keyed on colour, 8 of 8 passed.

[A top-level call that killed every panel of our popup](https://mosaicbrowser.com/blog/top-level-call-killed-the-popup): Our popup opened a panel before that panel's const existed. The ReferenceError stopped the rest of the script, so full screen was blank from every tab.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
