honkit
honkit copied to clipboard
Build performance
Summary
I'm building a book with a lot of pages with HonKit. The build time increases exponentially with the number of pages.
- 40 pages -> 2 seconds
- 240 pages -> 60 seconds
- 1500 pages -> 1 hour
Step to reproduce
-
honkit build
I have not installed any plugins.
- HonKit version: 3.6.23
Expected results
I expect the build time increases in proportion to the number of pages.
Additional Information
I got the profile of honkit build
with pprof-nodejs.
As a result, the following functions seem to be the bottlenecks.
Nice research!
Yes, HonKit looks like do duplicated works in building. Ideally, HonKit should build pages just one time. However, current HonKit build a page multiply(encode page etc..)
We need to find suitable building way.
📝 Note #243 is also related.
@azu @zoetrope I will handle it this week, the PR is comming soon!