honkit icon indicating copy to clipboard operation
honkit copied to clipboard

Build performance

Open zoetrope opened this issue 3 years ago • 2 comments

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

  1. 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.

image

zoetrope avatar Dec 29 '21 05:12 zoetrope

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 avatar Dec 29 '21 05:12 azu

@azu @zoetrope I will handle it this week, the PR is comming soon!

Yilun-Sun avatar Dec 29 '21 06:12 Yilun-Sun