docbuild takes ages (again)

1 view
Skip to first unread message

John Cremona

unread,
Dec 28, 2009, 12:02:14 PM12/28/09
to SAGE devel
I built the html documentation in a fresh 4.3 build using "sage
-docbuild reference html" as usual. I made a clone, and it appeared
that all the docs were rebuilt (another 5 mins). I made a change to a
docstring in one file (see #7780) and did "sage -b" and then "sage
-docbuild reference html" again, and again it appeared that all the
docs were built -- another 5 mins.

I don't what was actually taking the time: the waiting was for
"reading source" and "writing output".

Luckily my edits worked first time so I did not have to do the cycle
again; but and work on docstrings will be rather tedious unless
someone can work out why this is happening.

John

Pat LeSmithe

unread,
Dec 28, 2009, 2:09:18 PM12/28/09
to sage-...@googlegroups.com
On 12/28/2009 09:02 AM, John Cremona wrote:
> Luckily my edits worked first time so I did not have to do the cycle
> again; but and work on docstrings will be rather tedious unless
> someone can work out why this is happening.

I think the source may be #7683

http://trac.sagemath.org/sage_trac/ticket/7683

which adds a config value autodoc_builtin_argspec to Sphinx. This lets
us set

autodoc_builtin_argspec = sage.misc.sageinspect.sage_getargspec

to detect the arguments of methods and functions defined in Cython files.

Sphinx compares the current set of config values to a pickled set to
decide whether to reread all documents on the grounds

[config changed]

But autodoc_builtin_argspec is a function, which, I think, Sphinx
pickles as None. Moreover, sage_getargspec gets a different identity

id(sage_getargspec)

[nearly] each time Sphinx is run. This mismatch may trigger the full
rebuild.

A possible workaround: In

SAGE_LOCAL/lib/python2.6/site-packages/Sphinx-0.6.3-py2.6.egg/sphinx/environment.py

import inspect and insert, e.g.,

if inspect.isfunction(config[key]):
continue

around line 474.

John Cremona

unread,
Dec 28, 2009, 3:46:04 PM12/28/09
to sage-devel
I really hope we can fix this. It takes 10 minutes to make a clone on
my laptop now!

John

2009/12/28 Pat LeSmithe <qed...@gmail.com>:

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

Rob Beezer

unread,
Dec 28, 2009, 4:09:37 PM12/28/09
to sage-devel
I have similar behavior with a 4.3 built with sage -upgrade.

Without making a clone, anytime I edit, then run sage -b, a resulting
build of the HTML reference manual appears to begin all over again.
As John mentioned, this really discourages one from getting the
documentation fine-tuned on a contribution.

Thanks in advance to anyone who can get this back to its previous
behavior!

Rob

Minh Nguyen

unread,
Dec 30, 2009, 10:40:14 AM12/30/09
to sage-...@googlegroups.com
Hi John,

On Tue, Dec 29, 2009 at 7:46 AM, John Cremona <john.c...@gmail.com> wrote:
> I really hope we can fix this. It takes 10 minutes to make a clone on
> my laptop now!

See ticket #7796 [1] for an updated Sphinx spkg. The fix is
essentially what Pat suggested.

[1] http://trac.sagemath.org/sage_trac/ticket/7796

--
Regards
Minh Van Nguyen

Reply all
Reply to author
Forward
0 new messages