pagez

speed

How fast Pagez builds, and how much it adds to a page. These are scripts, not tests, and development says how to run them.

  • site.ts writes the large site that the speed scripts build.
  • speed.ts times this tree against another commit on that site (pnpm speed), or profiles one build (pnpm hotspots).
  • size.ts holds the theme, the head and the runtime to their budgets (pnpm size).

Code

  • site.ts

    What pnpm speed and pnpm hotspots build: a site of a few hundred pages, written into a folder, since the test sites' handful of pages never showed a slow build. It has what a real site's build pays for:

  • size.ts

    pnpm size measures what Pagez adds to a page, gzipped, as a browser pays for it, and fails past a budget, so growth shows in the pull request that causes it. verify runs it. It builds two test pages with the built plugin, dist/:

  • speed.ts

    pnpm speed asks whether a change moved the build. It builds the large site (site.ts) with this tree's Pagez and with origin/main's, each in a fresh process, in turns, three times.