-
-
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
Major performance issues #2164
Comments
Thanks for your effort in pointing out the bottlenecks. That said, Hexo do have fragment_cache. But some themes are not using it properly. |
For a layout for article page, there might be only one partial but it will be used to render a lot of posts. Those posts have different In order to use hexo's built-in helpers in the theme layout, all those helpers have to bind on each |
I will close this issue because the cache is controlled by the Hexo theme. The theme developer decides which rendered content is cached and reused. For example, if every page has the same footer element, then the footer should be rendered faster using |
Trying to investigate why Hexo is so slow, I found an interesting thing. Hexo always renders ALL files, even if no files are changed, and then rendering result for unchanged files is discarded.
Moreover, when rendering each file, it loads ejs templates and partials from the theme again and binds all the helpers, i.e. no template caching exists.
For example, for my not very bid site these two problems together lead to various ejs templates being processed 4500+ times and helpers being bound (
hexo/lib/theme/view.js
Line 78 in fc4ca63
Any comments on this and plans to fix?
The text was updated successfully, but these errors were encountered: