Skip to content

perf(ssg): add ssg.experimentalWorker based on tinypool to speed up ssg process#2394

Merged
SoonIter merged 7 commits intomainfrom
syt/ssg-tinypool
Jul 21, 2025
Merged

perf(ssg): add ssg.experimentalWorker based on tinypool to speed up ssg process#2394
SoonIter merged 7 commits intomainfrom
syt/ssg-tinypool

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Jul 18, 2025

Summary

ssg

  • Type: boolean | { experimentalWorker?: boolean; experimentalLoose?: boolean; }
  • Default: true

Whether to enable static site generation. Rspress enable it by default to generate CSR outputs and SSG outputs.

If your document site is only required to be used in CSR scenarios, you can set ssg to false, and Rspress will only generate CSR outputs.

import { defineConfig } from '@rspress/core';

export default defineConfig({
  ssg: false,
});

experimentalWorker

  • Type: boolean
  • Default: false

After enabled, you can use Worker to speed up the SSG process. It is suitable for large document sites and is based on tinypool.

experimentalLoose

  • Type: boolean
  • Default: false

After enabled, some errors in the SSG process will be ignored and other pages will continue to be generated, but the SSG of some pages will be missing. It is suitable for SSG errors that are used by large document sites to bypass a small number of pages. It is not recommended to actively enable them.

Related Issue

close #2272

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@SoonIter SoonIter changed the base branch from syt/ssg-fix to main July 18, 2025 07:59
@SoonIter SoonIter changed the title perf(ssg): tinypool po perf(ssg): tinypool pool Jul 18, 2025
@SoonIter SoonIter changed the title perf(ssg): tinypool pool perf(ssg): tinypool poc Jul 18, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 18, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 5394719
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/687e0c9b38aeb600084db389
😎 Deploy Preview https://deploy-preview-2394--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 18, 2025

Deploy Preview for rspress ready!

Name Link
🔨 Latest commit 5394719
🔍 Latest deploy log https://app.netlify.com/projects/rspress/deploys/687e0c9bd2eb8e0008135044
😎 Deploy Preview https://deploy-preview-2394--rspress.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 84 (🟢 up 7 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (🟢 up 9 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title perf(ssg): tinypool poc perf(ssg): add ssg.experimentalWorker based on tinypool to speed up ssg process Jul 21, 2025
@SoonIter SoonIter requested review from JounQin and Timeless0911 and removed request for Timeless0911 July 21, 2025 09:08
@SoonIter SoonIter enabled auto-merge (squash) July 21, 2025 09:44
@SoonIter SoonIter merged commit 7699288 into main Jul 21, 2025
11 checks passed
@SoonIter SoonIter deleted the syt/ssg-tinypool branch July 21, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Optimize SSG renderPages performance with tinypool

3 participants