Closed Rathur421 closed 2 years ago
Thanks for your contribution. Since the page generation time was dominated by tailwind css preprocessing on the first creation of the theme, I pruned the most of the unused components.
However, extending gridTemplateColumns
seems to only have a minor impact on performance in average (~0.01s), I'll merge the pull request and it'll be available in the next release.
I use demo site for the following tests. Replace gridTemplateColumns
:
❯ time hugo --themesDir=../..
Start building sites …
| EN | ZH-TW
-------------------+----+--------
Pages | 86 | 86
Paginator pages | 0 | 0
Non-page files | 0 | 0
Static files | 36 | 36
Processed images | 0 | 0
Aliases | 7 | 6
Sitemaps | 2 | 1
Cleaned | 0 | 0
Total in 1153 ms
hugo --themesDir=../.. 1.62s user 0.23s system 142% cpu 1.305 total
Extend gridTemplateColumns
:
❯ time hugo --themesDir=../..
Start building sites …
| EN | ZH-TW
-------------------+----+--------
Pages | 86 | 86
Paginator pages | 0 | 0
Non-page files | 0 | 0
Static files | 36 | 36
Processed images | 0 | 0
Aliases | 7 | 6
Sitemaps | 2 | 1
Cleaned | 0 | 0
Total in 1175 ms
hugo --themesDir=../.. 1.63s user 0.24s system 142% cpu 1.311 total
Your tailwind config replace the entirety of the gridTemplateColumns by "svg-group", "bookcase-item" and "statistic". Extending it seems more reasonable for those who want to modify it unless it is intended and you can ignore this.
Also thanks for the amazing work!