Skip to content

KUBB_PERFORMANCE: Performance

Code: KUBB_PERFORMANCE Level: info

Records a plugin's elapsed time. Kubb collects one per plugin during a build.

What happened

This is bookkeeping, not a problem. Kubb attaches a KUBB_PERFORMANCE record to every plugin with the milliseconds it took to generate. It never fails the build. It is not printed in the terminal as a diagnostic.

It surfaces in two places.

  • The run total durationMs in the --reporter json report is the sum of every KUBB_PERFORMANCE record.
  • The per-plugin timing bars in the end-of-run summary, shown with --verbose.
Terminal
shell
kubb generate --verbose
Terminal
shell
 Plugins  3 passed (3)
   Files  12 generated
Duration  81ms
  Output  ./src/gen
 Timings
 @kubb/plugin-react-query ████ 42ms
 @kubb/plugin-zod         ██ 21ms
 @kubb/plugin-ts          ██ 18ms

The total is the sum of plugin timings, so it counts generation only. It leaves out the config load, the formatter, the linter, and post-generate hooks.

How to fix it

Nothing to fix. To find a slow plugin, run kubb generate --verbose and read the timing bars. Then review that plugin's options or the schemas it generates.

See also