-
-
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
Speed up generating speed #550
Conversation
Yep, this is pretty brutal. My blog has 397 posts. It takes 2.5 hours to render!
|
FYI, have you ever tried other renderers? Do they render files slowly, too? |
I am currently using Octopress and just converted over to hexo this weekend. Octopress takes like 15 seconds to render my site. I started testing hexo on 2.3 and it was fast, so I was excited. I finally got around to doing the conversion this weekend and it was a brutal experience. I hope this issue gets solved... it is a bit of a barrier to entry. |
In commit 80da498, I moved rendering process to workers, which can make use of all cores of CPU. But it wastes lots of memory. Plus, I found the elapsed time decreased a lot if we don't use categories/tags. The bottleneck may be the data model? |
I tried jade&less theme (https://github.com/widatama/hexo-jade-barebone) and it generates my blog in 8 seconds, down from 3 minutes with default theme. I guess that hexo-renderer-ejs needs optimalization, not Hexo. |
@kamenitxan I think the problem is not the template engine. It's because this theme doesn't have widgets. The default theme has many widgets enabled by default which takes lots of time to query. |
Because it's more difficult to optimize data model, I came up with another idea: Fragment Cache #637 |
在hexo建立稳定之后,都是往里面添加新的文章,有没有可能在generate的时候只generate一些必要的页面,比如新的文章、archives、sitemap之类的? |
每次运行的时候都diff一下,然后生成有变动的网页? 不知道这样搞会不会反而速度更慢= = |
hexo server & 在后台运行的时候,hexo g 非常卡 |
@rose1988c 不用hexo server的时候卡不卡呢? |
|
Why you run |
@tommy351 我相信有部分人因为这个 因为我是 |
@rose1988c 我还是认为各司其职比较好,测试用 |
@Xuanwo 是nginx做的...... 俺是看到上面的说 |
@t3shi 我也不知道- -,或许你可以把分页关掉试试。。 |
@Xuanwo 你那个travis-ci提供了编译环境?免费帮忙编译部署到github? |
@tl3shi 持续集成,你可以自行google了解一下~ |
+1 for this improvement. 👍 |
@tommy351 is this project still alive? |
@rnarilani When you say "project" are you referring to Hexo, or this issue specifically? |
@JHabdas The hexo project, I just post it here since will probably open PR to enhance the project but the amount of open PR and their dates are making us doubt a little bit. |
@rbarilani Yes, it is alive. @tommy351 is busy, and I'm the current maintainer for the project. Feel free to submit any issues and PRs. 😄 |
@rbarilani if ever in doubt just look at the GitHub pulse and other metrics. Or just look at the date of the last closed issue(s) for bigger projects. @NoahDragon has been doing a bang up job triaging. Lucky for him this isn't the Yarn repo! xD |
@JHabdas thanks and good to know. |
@rbarilani My pleasure. Just for you my friend (kidding, it's actually for a blog post) I've put together frequency charts for Hugo, Hexo and Jekyll. And here they are: |
@JHabdas Can we use gitter chat for questions? I'm building a documentation theme on top of hexo and I have and I will have some questions. |
@JHabdas I don't mean to close this PR. I apologize if it seems confusing. What happens is that this PR's original base is I just change the base to |
我也有这个问题,随着文章数量和文章字数的不断增加, 有没有办法让hexo只生成新的post,因为老的文章已经生成和发布,便不需要再生成,这样也可以节约时间。如加入一个diff之类的命令? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
你好 想问一下这个问题解决了吗,我还没有升级到最新的hexo,现在135篇文章,728.3k字数,放到githubActions编译需要5分钟,想问一下是不是需要升级hexo版本可以解决这个编译时间长的问题 |
请至少升级到 Hexo > 4.0 版本,推荐升级到 Hexo 6.0.0。 |
Generating speed is slow when we have mass files. It may take 10 minutes to build a blog with 300+ posts.
Most time is consuming by file rendering. Every file needs 500ms to render on average (depends on the quantity of posts).