hugo-theme-zzo
hugo-theme-zzo copied to clipboard
The problem of extremely slow theme generation blogs
Hello author, this theme is really great, I really like it especially! But my blog has a lot of content, about 2200 md files, and with your theme, the output is extremely slow, over 60 seconds for a few hundred md files! I tried to put 2200 md files in and it didn't finish generating for 10 minutes, I don't know why, please help me, thanks
In the screenshot, the built-in time is 65.813
second to make about 14,000 pages.
Where did 10 minutes come from?
In the screenshot, the built-in time is
65.813
second to make about 14,000 pages. Where did 10 minutes come from?
This screenshot is only a few hundred md, not the entire content of my blog, the entire content of the blog was put in there for more than 10 minutes and did not finish generating, because it was too long, so I interrupted it!
For the same content, I tried other themes and generation took less than 15 seconds!
I really like this theme, so I'm asking for your help in figuring out why and shortening the build time!
Usually, I don't have a chance to manage the large MD files. Can you share your MD file with me? I'm not going to use it but want to check what's going on in the theme.
How do I send it to you? Can you give me an email address?
@Rhinocros yes [email protected]
Have sent to your email
I couldn't reproduce the issue on my computer. In my case, it only took 55 seconds to serve the 2,200MD files.
I made more than 2,200 MD files and it is only produced 4,500 pages.
I'm wondering why your case makes more than 20,000 pages with 2,200 MD files.
I don't know why it's generating so many pages, so what do I do now? Does this have anything to do with the hugo version?
I can't help you if it is not reproduced on my computer.
Is generating so many pages because the vast majority of them are tags pages, and how can I not generate tags pages? I want to try if I don't generate a tags page,will or not be faster
It can be done with this. In your config.toml
file,
...
disableKinds = ["taxonomy", "term"]
...
Okay, thanks. I'll try it.
I'm sure that's the problem, it works fine after disableKinds = ["taxonomy", "term"]
, is there a better solution?
https://s1.ax1x.com/2020/10/29/BGElh6.png
Would you like to share the results of hugo --templateMetrics
in your full site to see what slows you down the most. I just saw the build performance section of Hugo documentation because I also noticed that zzo
is a relatively heavy theme for Hugo since it packs so many nice features.
For example, my results of my personal blog running hugo --templateMetrics
:
Template Metrics:
cumulative average maximum
duration duration duration count template
---------- -------- -------- ----- --------
1m52.231113665s 660.183021ms 3.491000199s 170 _default/single.html
1m49.036079248s 273.959998ms 3.405399294s 398 partials/head/styles.html
8.431086805s 46.58059ms 769.405735ms 181 _default/taxonomy.html
6.166023468s 38.298282ms 99.817064ms 161 _default/taxonomy.searchindex.json
3.436419174s 3.436419174s 3.436419174s 1 about/single.html
3.436095485s 3.714697ms 739.699981ms 925 _default/summary.html
3.358309414s 3.630604ms 739.621091ms 925 partials/summary/classic.html
2.598695968s 13.326645ms 37.441103ms 195 partials/sidebar/sidebar-list.html
2.295428049s 10.982909ms 35.985036ms 209 partials/taxonomy/taxonomy-tags.html
2.06875004s 5.197864ms 998.678765ms 398 partials/head/meta_json_ld.html
1.320537312s 3.317932ms 22.183115ms 398 partials/navbar/site-nav.html
1.273748334s 90.982023ms 562.249935ms 14 _default/list.html
993.123095ms 70.937363ms 360.973869ms 14 index.html
644.860629ms 1.620252ms 19.533647ms 398 partials/navbar/nav-menu-mobile.html
592.98761ms 1.489918ms 19.834919ms 398 partials/head/scripts.html
511.353661ms 1.284808ms 17.485988ms 398 partials/navbar/nav-menu.html
507.101956ms 507.101956ms 507.101956ms 1 _internal/shortcodes/twitter.html
421.527425ms 30.109101ms 238.186076ms 14 archive/list.html
374.317027ms 2.201864ms 13.927675ms 170 partials/script/single-script.html
330.797942ms 831.15µs 6.08163ms 398 partials/head/meta.html
329.431034ms 1.937829ms 13.391334ms 170 partials/body/share.html
277.721554ms 1.328811ms 23.787015ms 209 partials/taxonomy/taxonomy-categories.html
264.1717ms 88.057233ms 91.901658ms 3 _default/list.searchindex.json
260.467916ms 1.532164ms 12.718485ms 170 partials/body/whoami.html
260.324128ms 86.774709ms 88.625165ms 3 _default/terms.searchindex.json
225.993686ms 567.823µs 8.933259ms 398 partials/head/services.html
223.08597ms 1.31227ms 9.856985ms 170 partials/body/infos.html
193.702399ms 486.689µs 6.164953ms 398 partials/footer/site-footer.html
173.406592ms 475.086µs 9.089528ms 365 partials/body/breadcrumb.html
172.775602ms 1.016327ms 12.303589ms 170 partials/pagination/pagination-single.html
163.486224ms 11.677587ms 29.510429ms 14 partials/sidebar/sidebar-home.html
154.682496ms 388.649µs 5.077697ms 398 partials/navbar/select-theme.html
146.506822ms 368.107µs 4.601246ms 398 partials/body/main-right.html
142.33777ms 357.632µs 11.790058ms 398 partials/search/site-search-mobile.html
137.016223ms 68.508111ms 134.481702ms 2 shortcodes/code.html
136.419909ms 802.47µs 11.441366ms 170 partials/body/photoswipe.html
131.00588ms 329.16µs 11.11038ms 398 partials/navbar/select-theme-mobile.html
115.578241ms 679.872µs 7.102718ms 170 partials/body/tags.html
110.151832ms 110.151832ms 110.151832ms 1 index.json
109.218226ms 275.108µs 11.30107ms 397 partials/search/site-search.html
104.493252ms 611.071µs 13.161267ms 171 partials/script/clipboard-script.html
100.623279ms 252.822µs 4.84373ms 398 partials/body/main-left.html
100.232954ms 251.841µs 17.284999ms 398 partials/header/site-header.html
97.622736ms 574.251µs 5.218108ms 170 partials/body/related.html
79.420597ms 467.179µs 6.738737ms 170 partials/comments/comments.html
77.32751ms 454.867µs 7.499549ms 170 partials/body/toc.html
63.798549ms 160.297µs 4.345957ms 398 partials/service/google-tag-manager.html
53.446515ms 239.67µs 4.376731ms 223 partials/pagination/pagination.html
46.762206ms 58.82µs 7.318206ms 795 partials/svgs/etc/search.svg
42.14726ms 250.876µs 3.2256ms 168 partials/svgs/arrow/arrow-back.svg
40.396777ms 101.499µs 2.561502ms 398 partials/service/baidu-analytics.html
39.396118ms 49.492µs 5.183595ms 796 partials/svgs/etc/invert-colors.svg
37.60082ms 221.181µs 3.791961ms 170 partials/svgs/share/twitter.svg
36.963473ms 92.873µs 771.422µs 398 partials/service/google-analytics.html
36.086902ms 211.034µs 5.421619ms 171 partials/script/codeblock-script.html
34.596579ms 203.509µs 3.442259ms 170 partials/svgs/share/reddit.svg
33.820125ms 201.31µs 2.089358ms 168 partials/svgs/arrow/arrow-forward.svg
31.856272ms 187.389µs 2.950327ms 170 partials/svgs/share/facebook.svg
30.891237ms 167.887µs 8.091273ms 184 partials/svgs/social/gitlab.svg
29.886919ms 175.805µs 5.223003ms 170 partials/svgs/share/line.svg
28.683658ms 168.727µs 5.047683ms 170 partials/body/donation.html
27.113867ms 68.125µs 3.5871ms 398 partials/footer/go-to-top.html
25.801606ms 151.774µs 4.79995ms 170 partials/comments/disqus.html
24.845888ms 1.774706ms 12.249784ms 14 partials/sidebar/site-bio.html
24.253779ms 131.814µs 4.71323ms 184 partials/svgs/social/github.svg
23.392822ms 38.538µs 3.713761ms 607 partials/svgs/etc/cancel.svg
23.230271ms 126.251µs 6.94008ms 184 partials/svgs/social/twitter.svg
22.035787ms 7.345262ms 12.140566ms 3 _default/terms.html
21.41901ms 129.812µs 10.80475ms 165 _internal/alias.html
19.705518ms 94.284µs 2.410055ms 209 partials/search/search-result-desktop.html
18.557575ms 18.557575ms 18.557575ms 1 _internal/_default/sitemap.xml
18.147247ms 98.626µs 2.72127ms 184 partials/svgs/social/facebook.svg
17.518093ms 83.818µs 2.162772ms 209 partials/taxonomy/taxonomy-series.html
17.261832ms 82.592µs 2.269186ms 209 partials/script/sidebar-script.html
17.248346ms 93.741µs 5.415075ms 184 partials/svgs/social/email.svg
13.607015ms 80.041µs 4.10633ms 170 partials/svgs/etc/full-screen.svg
11.823421ms 29.707µs 4.286079ms 398 partials/footer/select-lang.html
11.570139ms 29.07µs 1.787541ms 398 partials/service/busuanzi.html
8.8097ms 22.134µs 1.152128ms 398 partials/svgs/arrow/keyboard-arrow-up.svg
7.916716ms 46.568µs 2.723126ms 170 partials/svgs/arrow/arrow-right.svg
7.881965ms 46.364µs 1.821581ms 170 partials/svgs/arrow/arrow-left.svg
7.808529ms 45.932µs 2.144843ms 170 partials/svgs/etc/close.svg
7.071833ms 17.768µs 2.648298ms 398 partials/footer/links-social.html
6.454109ms 16.216µs 2.616138ms 398 partials/head/custom-head.html
5.433892ms 13.652µs 819.568µs 398 partials/footer/site-counter.html
4.420591ms 315.756µs 2.98237ms 14 partials/svgs/etc/people.svg
4.042029ms 19.339µs 556.727µs 209 partials/sidebar/list/posts-by-order.html
3.979691ms 23.409µs 896.461µs 170 partials/svgs/etc/normal-screen.svg
3.621046ms 3.621046ms 3.621046ms 1 404.html
2.841253ms 15.441µs 2.183811ms 184 partials/script/taxo-script.html
2.38085ms 2.38085ms 2.38085ms 1 sass/main.scss
1.989535ms 142.109µs 657.576µs 14 partials/header/header-text.html
1.544389ms 110.313µs 1.414054ms 14 partials/svgs/etc/location.svg
1.210232ms 1.210232ms 1.210232ms 1 _internal/shortcodes/vimeo.html
1.180413ms 295.103µs 651.894µs 4 _internal/shortcodes/youtube.html
1.085608ms 542.804µs 1.04275ms 2 shortcodes/expand.html
958.712µs 2.408µs 372.209µs 398 partials/body/custom-body.html
919.592µs 919.592µs 919.592µs 1 partials/script/about-script.html
872.45µs 62.317µs 860.706µs 14 partials/script/list-script.html
856.791µs 61.199µs 741.964µs 14 partials/svgs/etc/link.svg
836.462µs 836.462µs 836.462µs 1 shortcodes/boxmd.html
830.282µs 59.305µs 819.594µs 14 partials/script/archive-script.html
825.27µs 275.09µs 750.695µs 3 shortcodes/tab.html
823.561µs 54.904µs 540.135µs 15 partials/script/home-script.html
816.104µs 816.104µs 816.104µs 1 shortcodes/box.html
694.384µs 49.598µs 681.976µs 14 partials/sidebar/custom-home.html
631.695µs 157.923µs 557.72µs 4 shortcodes/alert.html
625.658µs 156.414µs 531.406µs 4 shortcodes/notice.html
622.577µs 622.577µs 622.577µs 1 shortcodes/codes.html
571.848µs 2.932µs 366.477µs 195 partials/sidebar/custom-list.html
557µs 557µs 557µs 1 shortcodes/tabs.html
522.887µs 261.443µs 516.553µs 2 partials/svgs/arrow/keyboard-arrow-right.svg
partialCached
could be a start. Ref: The Full Partial Series Part 1: Caching!
partialCached
could be a start. Ref: The Full Partial Series Part 1: Caching!
Thanks for your reply, I will try this method