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

fix(prerender): Fold output to prevent crashing on large prerender counts #10888

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

Josh-Walker-GM
Copy link
Collaborator

Problem

A user highlighted on our forum that when you prerender a large number of routes the CLI crashes.

This appears to be a result of having too many Listr tasks in our CLI output.

Changes

  1. If the number of routes for a particular route is beyond some threshold we fold the output into one task. Instead of showing each individual route we show the route's name a progress indicator.

@Josh-Walker-GM Josh-Walker-GM added the release:fix This PR is a fix label Jun 28, 2024
@Josh-Walker-GM Josh-Walker-GM added this to the next-release-patch milestone Jun 28, 2024
@Josh-Walker-GM Josh-Walker-GM self-assigned this Jun 28, 2024
Copy link
Member

@Tobbe Tobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried the code, but I think the general approach sounds good

Copy link
Member

@Tobbe Tobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried the code, but I think the general approach sounds good

@Josh-Walker-GM Josh-Walker-GM merged commit e0ab68a into main Jun 28, 2024
51 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw/prerender-fold-output branch June 28, 2024 13:10
Josh-Walker-GM added a commit that referenced this pull request Jun 28, 2024
…unts (#10888)

**Problem**

A user highlighted on our
[forum](https://community.redwoodjs.com/t/prerender-maximum-callstack-size-exceeded/7256)
that when you prerender a large number of routes the CLI crashes.

This appears to be a result of having too many Listr tasks in our CLI
output.

**Changes**
1. If the number of routes for a particular route is beyond some
threshold we fold the output into one task. Instead of showing each
individual route we show the route's name a progress indicator.
Josh-Walker-GM added a commit that referenced this pull request Jun 28, 2024
…unts (#10888)

**Problem**

A user highlighted on our
[forum](https://community.redwoodjs.com/t/prerender-maximum-callstack-size-exceeded/7256)
that when you prerender a large number of routes the CLI crashes.

This appears to be a result of having too many Listr tasks in our CLI
output.

**Changes**
1. If the number of routes for a particular route is beyond some
threshold we fold the output into one task. Instead of showing each
individual route we show the route's name a progress indicator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants