mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
The coming refactors and fixes change sync code, and a slowdown must be seen and explained in the commit that causes it. A JVM benchmark now times component sync on fixed-size worlds: - one main into 10, 100 and 1000 copies; - a change in the deepest of three nesting levels; - a chain of dependents (a in b in c, with copies of each); - a variant switch in a main with 100 copies; - a library update into a file with 500 copies. Each world is built once; only the sync an edit causes is timed, run to a fixpoint as the frontend watcher does. Each checks its result, so a world that synced nothing fails instead of timing nothing. `scripts/bench-components record` writes the baseline, recorded here on the code before this commit; `scripts/bench-components` compares against it and exits 1 when a world is more than 10% slower. It compares the lower quantile: with the devenv running, the mean of the same code moved from 0.41 to 1.13 of the baseline, the lower quantile by under 12%.
24 lines
835 B
Clojure
24 lines
835 B
Clojure
;; Component sync benchmark baseline, written by `scripts/bench-components record`.
|
|
{:commit "1e6615a132",
|
|
:date "2026-10-09",
|
|
:machine
|
|
{:cpu "Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz",
|
|
:cores 12,
|
|
:os "Linux amd64",
|
|
:jvm "26.0.2"},
|
|
:results
|
|
{:deepest-edit-through-three-levels
|
|
{:mean-ms 36.343, :lower-q-ms 35.215, :passes 4},
|
|
:edit-through-a-chain-of-dependents
|
|
{:mean-ms 75.119, :lower-q-ms 68.931, :passes 3},
|
|
:library-update-into-copies
|
|
{:mean-ms 89.295, :lower-q-ms 83.083, :passes 1},
|
|
:main-edit-into-10-copies
|
|
{:mean-ms 1.847, :lower-q-ms 1.79, :passes 1},
|
|
:main-edit-into-100-copies
|
|
{:mean-ms 16.234, :lower-q-ms 15.415, :passes 1},
|
|
:main-edit-into-1000-copies
|
|
{:mean-ms 158.728, :lower-q-ms 153.086, :passes 1},
|
|
:variant-switch-into-copies
|
|
{:mean-ms 33.1, :lower-q-ms 32.052, :passes 1}}}
|