Conversation

I benchmarked a few different versions of sphinx-build for 'make -j128 htmldocs' (with 128 cores) and got these results:

2.4.4 -- 7m37s
3.0 -- 94m43s
4.0 -- 70m49s
5.0 -- error
6.0 -- 97m12s
7.2.6 -- 17m18s

This machine can compile a full distro kernel in like 2 minutes.

I actually really like Sphinx but this is Not Good.

3
0
0

@vegard yes, something is horribly wrong with Sphinx's parallelism. :(

0
0
0
@vegard Something weird is going on there to get numbers like that. Sphinx got a lot slower starting with 3.x, but not that much slower (about a factor of two for me).

As far as I can tell, Sphinx can only do the parsing and building of the internal tree in parallel; the HTML generation is single-threaded. So more cores only help so much. But I have no idea why you would spend over an hour waiting for something I can do in six minutes on a basic desktop machine.
0
0
2

@jani @corbet For kernel_abi I think it should be fairly straightforward to change it to do what you're doing in kerneldoc.py?

But I really don't think what happens before we get to 'sphinx-build' is that much of a problem. Convoluted, maybe, but not a huge performance issue.

0
0
0

@jani @corbet Hm, I was going to suggest 'make htmldocs V=1' but that doesn't actually seem to do the right thing for some reason -- I was expecting it to print out the exact sphinx-build invocation. Although I do see it printing "Running Sphinx v4.3.2" so I know that getting to sphinx-build is less than 2-3 seconds.

0
0
0

@jani @corbet Luckily this is also fixable 🤓

1
0
0

@jani Do you want to claim this, or can I submit a patch?

0
0
0