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

switch post loading to async #116

Merged
merged 5 commits into from
May 18, 2023
Merged

switch post loading to async #116

merged 5 commits into from
May 18, 2023

Conversation

willpuckett
Copy link
Contributor

For issue #87

blog.tsx Outdated
Comment on lines 202 to 203
// Switch to async to speed larger blogs
// await loadPost(postsDirectory, entry.path);
Copy link
Member

Choose a reason for hiding this comment

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

not sure i understand this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. It didn't make sense of the context of the other stub comment above it, so I removed them both since the change resolves the stub and the additional comment brought no new meaning.

@ayame113
Copy link

ayame113 commented Mar 9, 2023

This PR should significantly improve server cold start. Can someone from the core team merge this?

@rojvv
Copy link
Contributor

rojvv commented Mar 9, 2023

They need to sign contracts with people who have more time to maintain more puppet projects, or just hand them over to suitable people.

@kt3k
Copy link
Member

kt3k commented May 7, 2023

I'm concerned about the case where the number of posts are very large. Can you use pooledMap from std to limit the number of the concurrent file requests?

@willpuckett
Copy link
Contributor Author

Does this look more appropriate? What is the largest poolLimit value that makes sense? I started with 10 but that was still pretty slow for my use case so I upped it to 25...

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@kt3k kt3k merged commit 4e99642 into denoland:main May 18, 2023
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.

5 participants