#14204: Building unchanged documentation takes very long
----------------------------+-----------------------------------------------
       Reporter:  jdemeyer  |         Owner:  GeorgSWeber
           Type:  defect    |        Status:  new        
       Priority:  blocker   |     Milestone:  sage-5.8   
      Component:  build     |    Resolution:             
       Keywords:            |   Work issues:             
Report Upstream:  N/A       |     Reviewers:             
        Authors:            |     Merged in:             
   Dependencies:            |      Stopgaps:             
----------------------------+-----------------------------------------------

Comment (by jhpalmieri):

 Replying to [comment:9 jdemeyer]:
 > I think the issue is
 > {{{
 >         build_command = 'python '+os.path.join(SAGE_DOC, 'common',
 'custom-sphinx-build.py')
 >         build_command += ' -b %s -d %s %s %s %s'%(type,
 self._doctrees_dir(),
 >                                                   options, self.dir,
 >                                                   output_dir)
 >         logger.debug(build_command)
 >         subprocess.call(build_command, shell=True)
 > }}}
 >
 > Could we replace this subprocess stuff by a simple Python function call
 or an `execfile()`?

 I tried to do that, but I think Sphinx has a memory leak (this has been
 suggested before). For whatever reason, after a little while it uses a lot
 of memory and slows way down. Actually, the inventory build sped up (from
 almost 2 minutes before down to about half a minute on an OS X machine
 with 2 cores), but the html build does not.

 In more detail, I tried importing sage.all once, and then using a Python
 function call to build each document: I basically stuck all of custom-
 sphinx-builder.py into builder.py, and replaced the `subprocess.call(...)`
 with
 {{{
         from sphinx.cmdline import main
         main(args)
 }}}
 This way sage.all would be imported just once, not 75 times. But there are
 issues. Maybe we should call `main(args)` some other way, so the memory is
 guaranteed to be released afterward? Any suggestions?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14204#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to