Repository navigation
docs: add a performance guide (#472) - #483
Merged
Merged
Conversation
Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.com>
Contributor
|
@minutechreview is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/performance.md, one short guide to the performance tools: bundle size and budgets, the unused code check, Lighthouse, long tasks in the end-to-end tests and the autosave counters. Each section says what the tool measures, how to run it and how to read the result. It includes a worked example of measuring the longest task of an interaction, based on the pattern intests/e2e/font-browser.spec.ts. The guide is linked from the Lighthouse section ofCONTRIBUTING.mdand from the Scripts section of the README. It is 106 lines.Closes #472
Screenshots
None, docs only.
Checklist
pnpm typecheck,pnpm test,pnpm lint,pnpm check:dashesandpnpm buildpassfeat:,fix:,docs:,chore:)any, noconsole.log, no new external services without a note in.env.exampleCHANGELOG.mdupdated if behavior changed (no behavior change)Breaking changes
None.
Testing completed
I ran every command in the guide on a fresh
mainbuild:pnpm build, thenpnpm bundle:size: every route is within its budget.pnpm bundle:size --json bundle-size-main.jsonfollowed bypnpm bundle:size --base bundle-size-main.jsonshows the "Change vs base" and "Status" columns (all 0, ok).pnpm check:unused: exit 0, only the.cssconfiguration hint.pnpm dlx @lhci/cli autorun(withCHROME_PATHset): 25 runs over the 5 pages, exit 0. Reports written to.lighthouseci/. Performance warnings on/brand(0.86),/typography(0.85) and/social(0.88) on my machine, which the guide uses to show how to read a warning.pnpm exec playwright install chromium, thenpnpm exec playwright test tests/e2e/font-browser.spec.ts tests/e2e/background-picker.spec.ts: 3 passed. The isometric test failed on my busy machine withExpected: < 300, Received: 366. That is unchangedmaincode, and it is the example of reading a long-task failure in the guide.pnpm dev, then__designhubSaves()in the browser console: it returned for example{"requested":2,"written":0,"skipped":2,"coalesced":1}on/projects. With no project open,/colorsedits countedrequestedonly, which the guide notes.pnpm format:check && pnpm check:dashespass, and so dopnpm typecheck,pnpm test(2743 tests) andpnpm lint.