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

Optimize performance when gathering content pages #173

Closed

Conversation

o1y
Copy link
Contributor

@o1y o1y commented Jun 26, 2024

Reimplement #154. Content gathering could take a long time for large Statamic sites. This commit makes these calls concurrent if spatie/fork is available.

In this implementation, URLs will no longer be cached in SSG because Statamic 5 already has an optimization for it.

Content gathering could take a long time for large content bases. This commit makes these calls concurrent if `spatie/fork` is available.
@jasonvarga
Copy link
Member

I'm assuming you're using the Cache there because you had trouble returning big collections from the fork tasks?

@jasonvarga
Copy link
Member

I added usleep(500) into Entry::uri() to simulate a slowdown and I don't notice any difference between the master branch and this one, when using workers. 🤔

@o1y
Copy link
Contributor Author

o1y commented Sep 26, 2024

I added usleep(500) into Entry::uri() to simulate a slowdown and I don't notice any difference between the master branch and this one, when using workers. 🤔

Oh, haha, you're right, there's no difference anymore - sorry! That was actually one of the main reasons I decided to close the PR since V5 has already addressed most of the slowdown issues when gathering pages, so this PR is no longer necessary. 🎡

@o1y o1y closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants