Re: [PATCH RFC 0/2] Add Kconfig pages and cross-references to Documentation

From: Jonathan Corbet
Date: Fri Apr 04 2025 - 10:31:52 EST


Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx> writes:

> This series adds Kconfig pages (patch 1) to the Documentation, and
> automarkups CONFIG_* text as cross-references to those pages (patch 2).
>
> There is a huge change in build time with this series, so we'd either
> have to so some optimization and/or put this behind a flag in make so it
> is only generated when desired (for instance for the online
> documentation):
>
> (On an XPS 13 9300)
>
> Before:
>
> real 6m43.576s
> user 23m32.611s
> sys 1m48.220s
>
> After:
>
> real 11m56.845s
> user 47m40.528s
> sys 2m27.382s
>
> There are also some issues that were solved in ad-hoc ways (eg the
> sphinx warnings due to repeated Kconfigs, by embedding the list of
> repeated configs in the script). Hence the RFC.

I'm still digging out from LSFMM, so have only glanced at this ... I can
see the appeal of doing this, but nearly doubling the docs build time
really isn't going to fly. Have you looked to see what is taking all of
that time? The idea that it takes as long to process KConfig entries as
it does to build the entire rest of the docs seems ... a bit wrong.

I wonder what it would take to create a Sphinx extension that would
simply walk the source tree and slurp up the KConfig entries directly?
That would be nicer than adding a separate script in any case.

I'll try to look closer, but I'll remain a bit distracted for a little
while yet.

Thanks,

jon