lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 8 Jan 2023 15:01:35 +0100
From:   Mauro Carvalho Chehab <mchehab@...nel.org>
To:     Akira Yokosawa <akiyks@...il.com>
Cc:     Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, mliska@...e.cz
Subject: Re: [PATCH] docs: Fix the docs build with Sphinx 6.0

Em Sat, 7 Jan 2023 14:17:24 +0900
Akira Yokosawa <akiyks@...il.com> escreveu:

> On Wed, 04 Jan 2023 13:45:35 -0700, Jonathan Corbet wrote:
> > Sphinx 6.0 removed the execfile_() function, which we use as part of the
> > configuration process.  They *did* warn us...  Just open-code the
> > functionality as is done in Sphinx itself.
> > 
> > Tested (using SPHINX_CONF, since this code is only executed with an
> > alternative config file) on various Sphinx versions from 2.5 through 6.0.
> > 
> > Reported-by: Martin Liška <mliska@...e.cz>
> > Signed-off-by: Jonathan Corbet <corbet@....net>  
> 
> I have tested full builds of documentation with this change
> with Sphinx versions 1.7.9, 2.4.5, 3.4.3, 4.5.0, 5.3.0, and 6.0.0.
> 
> Tested-by: Akira Yokosawa <akiyks@...il.com>
> 
> That said, Sphinx 6.0.0 needs much more time and memory than earlier
> versions.
> 
> FYI, I needed to limit parallel slot to 2 (make -j2) on a 16GB machine.
> If you are lucky, -j3 and -j4 might succeed. -j5 or more ended up in
> OOM situations for me:
> 
> Comparison of elapsed time and maxresident with -j2:
> 
>   ============== ============ ===========
>   Sphinx version elapsed time maxresident
>   ============== ============ ===========
>   5.3.0          10:16.81      937660
>   6.0.0          17:29.07     5292392
>   ============== ============ ===========

From the changelogs:
	https://www.sphinx-doc.org/en/master/changes.html

It seems that 6.1 came with some performance optimizations, in particular:

    Cache doctrees in the build environment during the writing phase.

    Make all writing phase tasks support parallel execution.

    Cache doctrees between the reading and writing phases.

It would be nice if you could also test and check elapsed time
there too, as I suspect that 6.0 will have a very short usage, as
6.1 was released just a few days after it.

Regards,
Mauro.



> 
>         Thanks, Akira
> 
> > ---
> >  Documentation/sphinx/load_config.py | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/load_config.py
> > index eeb394b39e2c..8b416bfd75ac 100644
> > --- a/Documentation/sphinx/load_config.py
> > +++ b/Documentation/sphinx/load_config.py
> > @@ -3,7 +3,7 @@
> >  
> >  import os
> >  import sys
> > -from sphinx.util.pycompat import execfile_
> > +from sphinx.util.osutil import fs_encoding
> >  
> >  # ------------------------------------------------------------------------------
> >  def loadConfig(namespace):
> > @@ -48,7 +48,9 @@ def loadConfig(namespace):
> >              sys.stdout.write("load additional sphinx-config: %s\n" % config_file)
> >              config = namespace.copy()
> >              config['__file__'] = config_file
> > -            execfile_(config_file, config)
> > +            with open(config_file, 'rb') as f:
> > +                code = compile(f.read(), fs_encoding, 'exec')
> > +                exec(code, config)
> >              del config['__file__']
> >              namespace.update(config)
> >          else:
> > -- 
> > 2.38.1  



Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ