Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce worker thread pools for SSR page generation #983

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Oct 16, 2022

Related Issue

resolves #970 (mostly)

This now greatly improves performance and while it takes a while, Greenwood can now easily generate 4000 pages from the linked benchmarks and at least improves perceived performance as it start spitting out pages / terminal output right away (terminal doesn't hang)

Summary of Changes

  1. Introduce a Worker thread pool for SSR rendering (minor update to custom renderer plugin for worker based API)

TODOs

  1. Handle lit polyfills + prerender + WCC combo as it seems WCC errors out? - Can't reproduce?
  2. development graph gathering un-optimized (TBD)? Actually, even for 4000 pages seems pretty fast actually!
  3. Pool configuration, how to best gauge for various scenarios? (right now just defaults to CPU count) - - seems like adding more thread didn't help much?
    • configuration override
    • account for number of pages?
  4. Node version testing / compatibility
    • 14.x ✅
    • 16.x ✅
    • 18.x ✅
  5. Update in benchmarks repo and capture latest measurements (testing using MBA + 4000 pages) - performance benchmarking / optimizing Greenwood #970 (comment)

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) documentation Greenwood specific docs Plugins Greenwood Plugins CLI breaking labels Oct 16, 2022
@thescientist13 thescientist13 self-assigned this Oct 16, 2022
@thescientist13 thescientist13 removed the documentation Greenwood specific docs label Oct 19, 2022
@thescientist13 thescientist13 marked this pull request as ready for review October 19, 2022 01:05
@thescientist13 thescientist13 mentioned this pull request Oct 19, 2022
27 tasks
@thescientist13 thescientist13 linked an issue Oct 19, 2022 that may be closed by this pull request
18 tasks
@thescientist13 thescientist13 merged commit 96c684e into release/0.27.0 Nov 3, 2022
@thescientist13 thescientist13 deleted the enhancement/issue-970-introduce-worker-thread-pools branch November 3, 2022 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.2 breaking CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins v0.27.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

performance benchmarking / optimizing Greenwood
1 participant