From 6165cb0174383c44157573bf8f918d426d9a74a7 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:54:39 +0800 Subject: [PATCH] perf: Add a black-box comparison with other IDEs (#6) perf/compare/bench.py launches each IDE in apps.toml on the same project and measures it from the outside, the same way for each: time to the project window, to CPU settling and to log markers; memory and CPU of the whole process tree; idle CPU, exit time, cache and install size. Runs on Windows, macOS and Linux with psutil; --wipe-caches measures a cold index. README: a Benchmark section with the first results against IntelliJ IDEA. --- README.md | 20 ++ perf/compare/.gitignore | 2 + perf/compare/README.md | 51 +++ perf/compare/apps.toml | 43 +++ perf/compare/bench.py | 614 ++++++++++++++++++++++++++++++++++ perf/compare/requirements.txt | 2 + 6 files changed, 732 insertions(+) create mode 100644 perf/compare/.gitignore create mode 100644 perf/compare/README.md create mode 100644 perf/compare/apps.toml create mode 100644 perf/compare/bench.py create mode 100644 perf/compare/requirements.txt diff --git a/README.md b/README.md index 982d92364..43dce9676 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,26 @@ its search-everything habits — to a native app with a Rust core. Editor, code insight, debugger, Git, terminal, database and HTTP clients, for 60+ languages. +## Benchmark + +Opening [freqtrade](https://github.com/freqtrade/freqtrade) (Python, ~770 files) +with warm caches, median of 5 runs: + +| | OpenIDEA | IntelliJ IDEA 2026.2.3 | +|---|---|---| +| Window with the project | **0.9 s** | 3.1 s | +| Ready (CPU settled) | **1.1 s** | 13.2 s | +| Memory (USS, all processes) | **169 MB** | 2011 MB | +| CPU time until ready | **2.4 s** | 47.9 s | +| Idle CPU | **4 %** of a core | 7 % of a core | +| Quit | **0.3 s** | 5.9 s | + +A release build of OpenIDEA from `main` and IDEA with default settings and plugins, on +Windows 11, 32-core AMD, 62 GB RAM. +IDEA analyses Python more deeply, so "ready" doesn't mean the same work on +both sides. Both are measured from the outside, the same way: see +[`perf/compare`](perf/compare) to run it on your machine and projects. + ## Build ```sh diff --git a/perf/compare/.gitignore b/perf/compare/.gitignore new file mode 100644 index 000000000..b45f55965 --- /dev/null +++ b/perf/compare/.gitignore @@ -0,0 +1,2 @@ +results/ +__pycache__/ diff --git a/perf/compare/README.md b/perf/compare/README.md new file mode 100644 index 000000000..304a57926 --- /dev/null +++ b/perf/compare/README.md @@ -0,0 +1,51 @@ +# IDE comparison + +`pnpm perf` measures OpenIDEA from inside its webview. This measures any IDE +from the outside, the same way for each, so OpenIDEA can be compared with +IntelliJ IDEA (or anything else listed in `apps.toml`). + +```sh +pip install -r perf/compare/requirements.txt +python perf/compare/bench.py ~/src/spring-petclinic --runs 10 +python perf/compare/bench.py ~/src/spring-petclinic --runs 5 --wipe-caches # cold index +``` + +Each run launches the app on the project, waits until it is ready, idles, +closes it, and records: + +| Metric | How | +|---|---| +| `window_s` | first visible window whose title matches `window_title` (the project name) | +| `ready_s` | the process tree's CPU stays under `--quiet-cores` for `--quiet-secs`, after the window and any `ready_after` markers | +| markers | first/last time a log line matches, e.g. OpenIDEA `indexed`, IDEA `exit dumb mode` | +| `peak_rss_mb`, `rss_mb`, `uss_mb`, `pss_mb` | summed over every process the app started (WebView2/WebKit, jdtls, language servers, the JVM) | +| `total_cpu_s`, `idle_cpu_pct` | CPU time until ready; CPU while idle for `--idle-secs` | +| `exit_s` | until every process has exited | +| `cache_mb`, install size | `cache_dirs`, `install_dir` | + +Apps run interleaved, rotating the order, after `--warmup` discarded runs. +Output goes to `results/