Skip to content
addfoxPublic

About

Benchmark of Addfox

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extension Build Benchmark

Addfox 0.2.9 Performance Update: Compared to Addfox 0.2.5, the latest version delivers significant dev startup and build improvements:

  • Dev startup: 1.92s → 1.56s (~1.23x faster, ~0.36s saved)
  • Build time: 1.48s → 1.04s (~1.42x faster, ~0.44s saved)
  • Output size: unchanged at 837 KB

Addfox ranks first in both dev startup time and build time among the four frameworks in this benchmark.

This repository benchmarks four browser extension frameworks by building the same extension with identical functionality. The goal is to compare dev startup time, build time, and output size.

Reference: rstackjs/build-tools-performance

Agent Prompt

If you are an AI agent, run the benchmark with the following prompt:

Run the extension build benchmark in this repository. Work from the repository root. First, ensure the environment is quiet: close any unnecessary browsers and background apps, kill stray chrome.exe / msedge.exe processes, and free ports 23333 and 4299. Then run node scripts/benchmark-compare.mjs snapshot to record the current baseline, run node scripts/run-benchmark-suite.mjs build, then node scripts/run-benchmark-suite.mjs dev, and finally node scripts/benchmark-compare.mjs to compare the new results against the baseline. Report the average build time, dev startup time, and output size for each framework, with special attention to Addfox.

Frameworks

Directory Framework Version Bundler Description
addfox/ Addfox 0.2.9 Rsbuild 2.2.1 Rsbuild-based framework (addfox.config.ts, defineConfig + pluginReact)
wxt/ WXT 0.21.4 Vite 8.1.2 WXT framework
plasmo/ Plasmo 0.90.5 Parcel 2.9.3 Plasmo framework
extensionjs/ Extension.js 4.1.5 Rspack 2.2.1 Extension.js framework

Benchmark Results

Environment

  • OS: Windows
  • Browser: Microsoft Edge
  • Node.js: 24.16.0
  • Package Manager: pnpm 11.11.0
  • Test Method: 8 runs per framework, averaged (warm-up run before each suite to eliminate cold-start bias)
  • Last Updated: 2026-09-02

Dev Startup Time

Time from running dev command to dev server ready (including browser launch and extension installation where applicable):

Note: All frameworks automatically open the browser and install the extension during dev. Each framework was tested with 8 runs after a warm-up run to eliminate cold-start bias. Ready markers: Addfox extensions loaded, WXT Opened browser in, Extension.js 🧩 Extension.js banner, Plasmo Extension re-packaged (its CLI prints nothing after the browser launches).

Framework Average Min Max Runs
Addfox 1.56s 1.51s 1.75s 1.53, 1.51, 1.54, 1.55, 1.54, 1.75, 1.54, 1.54
WXT 1.99s 1.97s 2.01s 2.00, 2.00, 2.01, 2.00, 1.97, 1.98, 1.99, 1.98
Extension.js 2.86s 2.82s 2.89s 2.89, 2.85, 2.86, 2.82, 2.84, 2.87, 2.88, 2.88
Plasmo 2.91s 2.87s 2.94s 2.94, 2.92, 2.93, 2.89, 2.89, 2.94, 2.88, 2.87

Build Time

Time to complete production build (total time from running the command to build complete, including CLI startup overhead). Extension.js is measured at its Extension built for production marker (zip packaging step excluded):

Framework Average Min Max Runs
Addfox 1.04s 1.02s 1.06s 1.04, 1.05, 1.03, 1.06, 1.03, 1.04, 1.05, 1.02
Extension.js 1.61s 1.59s 1.63s 1.63, 1.60, 1.60, 1.59, 1.61, 1.60, 1.61, 1.63
WXT 1.64s 1.63s 1.65s 1.63, 1.63, 1.63, 1.65, 1.64, 1.64, 1.64, 1.63
Plasmo 2.54s 2.49s 2.60s 2.52, 2.54, 2.60, 2.55, 2.53, 2.49, 2.55, 2.53

Build Output Size

Production build output (excluding source maps):

Framework Size Target
WXT 810 KB chrome-mv3
Addfox 837 KB extension-chromium
Plasmo 1.36 MB chrome-mv3-prod
Extension.js 1.91 MB chromium (no source maps; chrome/edge builds are ~20 MB each with source maps)

Measurement method: Output directory is cleaned before each build. Size is the exact sum of all file bytes in the production output directory (source maps excluded).

Summary

Framework Version Dev Startup Build Time Output Size
Addfox 0.2.9 🥇 1.56s 🥇 1.04s 🥈 837 KB
WXT 0.21.4 🥈 1.99s 🥉 1.64s 🥇 810 KB
Extension.js 4.1.5 🥉 2.86s 🥈 1.61s 4th 1.91 MB
Plasmo 0.90.5 4th 2.91s 4th 2.54s 🥉 1.36 MB

Unified Tech Stack

  • Framework: React + Tailwind CSS 3
  • Dependencies: lodash, react, react-dom, webextension-polyfill
  • Entry Points: background, content, options, popup, sidepanel, devtools, space (custom)
  • Features:
    • Popup: Capture screenshot of current page
    • Sidepanel: Fake AI chat (fixed responses)
    • DevTools: Display captured element colors
    • Space: Display captured screenshots (temporary storage)
    • Options: Common settings UI (language, limits, permissions)
  • Resources: Icons from VideoRoll-Pro, i18n via _locales (en / zh_CN)

Usage

1. Install Dependencies

pnpm install --no-frozen-lockfile

2. Copy Icons

Requires VideoRoll-Pro repository:

pnpm run copy-icons

3. Run Individual Tests

Dev startup time:

pnpm run test:addfox
pnpm run test:wxt
pnpm run test:plasmo
pnpm run test:extensionjs

Build time:

pnpm run build:addfox
pnpm run build:wxt
pnpm run build:plasmo
pnpm run build:extensionjs

4. Batch Benchmark (8 runs with average)

# Dev benchmark
node scripts/run-benchmark-suite.mjs dev

# Build benchmark
node scripts/run-benchmark-suite.mjs build

Directory Structure

benchmark/
├── package.json               # Root scripts: copy-icons, test:*, build:*
├── pnpm-workspace.yaml        # Workspaces: addfox, wxt, plasmo, extensionjs
├── scripts/
│   ├── dev-benchmark.mjs      # Dev startup time benchmark
│   ├── build-benchmark.mjs    # Build time benchmark
│   ├── run-benchmark-suite.mjs # 8-run benchmark suite with averages
│   ├── batch-benchmark.mjs    # Batch test all frameworks
│   └── copy-icons.mjs         # Copy icons from VideoRoll-Pro
├── shared/
│   ├── icons/                 # Shared icons
│   └── locales/               # i18n reference
├── addfox/                    # Addfox implementation
├── wxt/                       # WXT implementation
├── plasmo/                    # Plasmo implementation
└── extensionjs/               # Extension.js implementation

Implementation Status

  • ✅ Addfox: Fully implemented with all features
  • ✅ WXT: Fully implemented with all features
  • ✅ Extension.js: Fully implemented with all features
  • ✅ Plasmo: Fully implemented with all features

About

Benchmark of Addfox

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages