-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Concurrent rendering of nunjucks tags within a post #4923
Comments
The feature sounds awesome! You can draft a PR first as a PoC. And we will see if any changes/adoptions are required. |
UPDATE: I managed to fix the issue. I ran into a test failure that I'm not sure how to address.
When the entire input is given, nunjucks is smart enough to know that the first
|
Check List
Please check followings before submitting a new feature request.
Feature Request
Currently, if we use async rendering in custom tag plugins, rendering of tags can run concurrently between posts. However, tags within the same post are still rendered sequentially.
This is because when rendering a post, hexo makes a single
render
call to nunjucks to render the entire post. Inside nunjucks, it renders all the tags sequentially.I have a custom tag plugin that needs to make expensive async calls, so it could benefit a lot from within-post async rendering of tags.
Others
I have made a draft implementation of this feature at ppwwyyxx@17565f7 . Instead of making one
render
call per-post, it finds each nunjucks tag in the post and callrender
on each of them.This diff has improved my whole-site generation speed by 10x.
I would like to hear:
The text was updated successfully, but these errors were encountered: