Skip to content
nexus-dialogs
GitHub npm

Performance

The published sizes and timings can be measured again on your machine with a single command. Here is what is measured, how, and the numbers from the latest measurement.

#How to repeat it

npm ci
npm run build
npm run bench             # prints the tables
npm run bench -- --write  # also updates this page

Timings use Chromium with Playwright; if you already have one installed, PW_CHROMIUM=/path/to/chrome npm run bench.

#Compare two versions

To know whether a change made the library heavier or slower, save the measurement of the base version and compare it with yours, on the same machine:

git checkout main && npm run build && npm run bench -- --json base.json
git checkout my-branch && npm run build && npm run bench -- --comparar base.json

The table shows, for each file, each "use only a part" case and each timing, the value before, the current one and the change in percent. If a size grows by more than 3%, the command exits with an error (sizes don't depend on the machine; timings do, so they are only reported).

#What is measured and what is not

The per-file size limits are enforced by CI (npm run size); timings and memory are informative and fail nothing.

#Results

Environment of this measurement: Intel(R) Xeon(R) Processor @ 2.30GHz · linux 6.18.44-fc-v445 · Node v22.23.4 · Chromium 153.0.8010.12.

#Size of each file

Filemin + gzipmin + brotli
nexus-dialogs.js10.81 KB9.62 KB
nexus-dialogs.all.js41.37 KB35.50 KB
forms.js23.22 KB20.82 KB
toast.js6.24 KB5.48 KB
themes.js1.36 KB1.19 KB
patterns.js6.17 KB5.49 KB
mx.js1.08 KB0.98 KB
swal.js7.52 KB6.80 KB
import.js10.08 KB9.03 KB
table.js3.57 KB3.13 KB
rrhh.js3.97 KB3.58 KB
sepomex.js0.53 KB0.46 KB
vue.js0.84 KB0.75 KB
react.js1.03 KB0.94 KB
angular.js0.94 KB0.84 KB

#What using only a part weighs (with a bundler)

Casemin + gzipmin + brotli
Only dialog (alerts and confirmations)10.08 KB9.03 KB
dialog + form31.88 KB27.36 KB
Only Mexican validators (mx)0.28 KB0.26 KB

#Timings in Chromium (reduced animations)

From the function call until the dialog is on screen with its button ready.

ScenarioMedianp95
First dialog (cold start)8.5 ms—
dialog.alert, 200 openings0.4 ms0.7 ms
form with 20 fields, 50 openings1.5 ms3.9 ms

#Memory

After 200 openings and closings of dialog.alert (with garbage collection before and after), the JavaScript heap changed +12 KB and 0 dialogs were left in the DOM.