docs: automarkup: track failed cross-reference attempts
authorJonathan Corbet <corbet@lwn.net>
Thu, 30 Jun 2022 16:36:29 +0000 (10:36 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 7 Jul 2022 18:57:48 +0000 (12:57 -0600)
commit26c82972f20f6b3fdbd77b2802693808da3c0c09
treed0c423a827b11d1093a9a69b823b6433488f01a7
parentf2c1ff0d3be2670d04afba792ec0c79d37a9cfc8
docs: automarkup: track failed cross-reference attempts

The automarkup code tries to create a lot of cross-references that don't
exist.  Cross-reference lookups are expensive, especially in later versions
of Sphinx, so there is value in avoiding unnecessary ones.  Remember
attempts that failed and do not retry them.

This improves the htmldocs build time by 5-10% depending on the phase of
the moon and other factors.

Tested-by: Akira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/20220630163630.714673-2-corbet@lwn.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/automarkup.py