Tried profiling sphinx to figure out where all the time is going.
...I still have no idea.
@dotstdy We're spending like 3 minutes in something called deepcopy().
@dotstdy over 12 minutes are spent in that resolve_xref() trying to look up C identifiers by name by traversing some kind of tree and comparing them one by one. It *must* be possible to simplify that with a hash lookup or two.
@dotstdy and there's an open issue for it: https://github.com/sphinx-doc/sphinx/issues/10966 ...with patches 🤩
@kees I explicitly disabled the jobserver-exec/parallel-wrapper.sh logic in the kernel's documentation Makefile for profiling/benchmarking purposes. As far as I can tell, parallel support (-j) is there in the sphinx master branch.
@corbet You don't still have those patches lying around by any chance? 🤓
I *think* a lot of that stuff was written for C++ where you may actually need to care more about name lookups since the same name can refer to different things depending on context (namespaces, member functions, etc.). But I could be completely wrong.