element: the first-load size budget is used up

Open
#546 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, web-dev

Research direction

Read build.js and inspect the first-load size report from npm run size -w pivotkit-element; compare the local result with the CI measurement described in the issue. Identify code that can load on demand and assess how the 175 KiB budget should be enforced. Done means the first-load budget policy and the local-to-CI size check are addressed.

Written by the indexing model from the issue text.

Description

area:react enhancement

pivotkit-element's first load ("initial" in build.js SIZE_BUDGET_KIB) is at its budget. On main, CI measured 175.0 KiB gzip against 175 KiB, and #545 raised the budget to 175.1 KiB for 40 bytes of shared grid constants. Each new feature that touches the first load will hit the budget again.

CI measures about 0.6 KiB more than a local macOS build, so a local npm run size -w pivotkit-element can pass while CI fails.

Proposal:

  • Find what in the first load could load later: chart planning code, menus that open only on demand, texts of rare messages.
  • Decide whether the budget stays a hard line at 175 KiB, or moves with a recorded reason.
  • Make the local size check match CI, for example by pinning the same esbuild and gzip level, or by printing the CI difference.
Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
3h 21m
Merged PRs (30d)
250

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eizedev/pivotkit

All issues in eizedev/pivotkit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.