Repository navigation
Conversation
Turning a file's Tailwind output into its final CSS is pure and was 441 ms of main-thread work in the skins build. One worker now does it while Tailwind compilation, the design system, and its watch files stay on the main thread, taking skins generate from about 2.2 s to 1.75 s wall. More workers only added CPU. Builds from source, VJSC_RENDER_WORKERS=0, and any worker that fails to start, receive a job, or stay alive render on the main thread instead.
Piscina starts workers as jobs arrive, keeps them between a build's bursts of renders, frees them after ten idle seconds, and lets idle ones exit with the process, which the pool handled by hand. Workers now report render errors as results, so a rejected job always means a failed worker, and the pool renders it and every later job on the main thread. A worker that fails to load leaves its jobs pending in Piscina, so a pool error aborts every job in flight. Tinypool was tried first, but a worker that exits mid-job leaves its job pending forever.
…rors intact A worker that exited before Piscina marked it ready left the jobs waiting for it pending without a pool error, so a build or a dev-server transform could hang. The pool now counts the workers Piscina announces as ready against the workers it removes; removing more than it announced aborts every job in flight, and those jobs render on the main thread. A render error crossed the thread as its name, message, and stack only, losing Lightning CSS's source location and the error's class. Workers now only report that a render failed, and the main thread renders that file again, which throws the error itself. Rendering is pure, so it fails the same way, and the worker stays in use. `renderStylesheets` still renders a document's files at once, but reports the earliest failed file in document order rather than whichever failed first.
@videojs/cdn
@videojs/cli
@videojs/core
@videojs/element
@videojs/html
@videojs/media
@videojs/react
@videojs/spf
@videojs/store
@videojs/utils
@videojs/cloudflare-video
@videojs/dash-video
@videojs/hlsjs-video
@videojs/mux-audio
@videojs/mux-video
@videojs/native-hls-video
@videojs/playerjs-video
@videojs/shaka-video
@videojs/spotify-audio
@videojs/tiktok-video
@videojs/twitch-video
@videojs/vimeo-video
@videojs/wistia-video
@videojs/youtube-video
@videojs/google-cast
@videojs/mux-data
commit: |
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (19)
Players (5)
Skins (53)
UI Components (62)
⚛️ @videojs/react — no changesPresets (7)
Media (23)
Extensions (2)
Players (5)
Skins (34)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/cdn — no changes📦 @videojs/cloudflare-video — no changes📦 @videojs/dash-video — no changes📦 @videojs/google-cast — no changes📦 @videojs/hlsjs-video — no changes📦 @videojs/media — no changesEntries (3)
📦 @videojs/mux — no changes📦 @videojs/mux-audio — no changesEntries (2)
📦 @videojs/mux-data — no changes📦 @videojs/mux-video — no changesEntries (2)
📦 @videojs/native-hls-video — no changes📦 @videojs/playerjs-video — no changes📦 @videojs/shaka-video — no changes📦 @videojs/spf — no changesEntries (7)
📦 @videojs/spotify-audio — no changes📦 @videojs/tiktok-video — no changes📦 @videojs/twitch-video — no changes📦 @videojs/other — no changesEntries (3)
📦 @videojs/vimeo-video — no changes📦 @videojs/wistia-video — no changesEntries (2)
📦 @videojs/youtube-video — no changesℹ️ How to interpretEach entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately. Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles. Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded. Run |
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vjs-registry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been 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.
Summary
Moves VJSC's post-Tailwind CSS rendering onto one worker thread. In the skins build that step was 441 ms of main-thread work across 134 unique file renders, and moving it takes skins generate from about 2.2 s to 1.75 s wall (build step 1.83 s → 1.43 s).
Ported from videojs/v10#2972, rebased onto #9478. Last of three stacked PRs: videojs/v10#2971 (merged) → #9478 → this.
Changes
renderCompiledFile).VJSC_RENDER_WORKERSsets the count, and0keeps rendering on the main thread.renderStylesheetsrenders an owner's files concurrently and keeps them in order. A failure reports the earliest failed file in that order.The three commits rebased onto #9478 without changes.
Testing
pnpm install --frozen-lockfile, then every package built with nothing cached. It passes.generateoutputs, built in two different checkouts.@videojs/skins(103), and every other package'stest:ciexcept@videojs/spfpass, apart from the@videojs/htmlthumbnail test that refactor(packages): restructure vjsc and the skins build #9478 describes, which fails onmaintoo.pnpm typecheck,pnpm lint, andpnpm check:workspacepass.renderStylesheetsreports the earliest failed file in document order.SyntaxErrorfrom a worker equals the in-process error: same class,loc,source,fileName, anddata.@videojs/spf's browser tests. Playwright has no Chromium for this machine's OS release.🤖 Generated with Claude Code