Repository navigation
test(e2e): add an open and render benchmark - #149
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously deployed
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.
Speeding up opening and rendering needs a repeatable number to beat and a check that the output didn't change, and neither existed for whole decks in a production build.
pnpm bench(root or@diceui/pptx-e2e) buildsharness/bench.htmlwith Vite in production mode and opens five generated decks in headless Chromium: small (an exported fixture, 8 slides), text-heavy (60), image-heavy (40, 24 distinct JPEG and PNG images), many-slides (300, grown from an exported fixture) and shapes-charts (40, presets, custom geometry, groups and two charts each).--runsfresh pages.--save-buildand--againstrun a saved baseline build and the current build alternately, with the order flipped each run, so machine load lands on both sides.--profilewrites an unminified CPU profile and prints the top self-time functions.--shotsscreenshots every slide at native size, andpnpm bench:diffcompares two shot directories pixel by pixel and exits non-zero on any difference.scripts/bench/decks.tswith fixed zip dates and seeded image noise, so they are byte-for-byte reproducible. They are written to the gitignoredrecordings/bench/decks/, so no binary is committed.sideEffects: false, and Vite 8 then drops the ECharts registration inrenderer/chart/echarts.ts, so every chart fails withpainterCtors[rendererType] is not a constructor. The bench build marks that module as having side effects. The same failure probably hits apps that bundle core with Vite 8 and is left for a separate fix.Baseline on
mainatcaea2eb, median of 7 runs, Chromium headless shell 156 on Linux (4 cores, shared machine), in milliseconds unless noted:An A/A run (the same build on both sides) moves individual stages by up to ±10%, so smaller changes are noise. Two shot runs of the same build match on all 448 slides.
Not shown:
font-perfcovers font decoding.