-
-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update doc system to jsmath and improve build system (parallel doc builds) #6255
Comments
comment:3
Please see #6495 for a tentative approach to parallel doc builds |
comment:4
I made an attempt to have parallel doc build. It seems that I have it for the write part of the doc generation process. Here is the diff diff --git a/builders/__init__.py b/builders/__init__.py
--- a/builders/__init__.py
+++ b/builders/__init__.py
@@ -286,14 +286,27 @@ class Builder(object):
# write target files
warnings = []
self.env.set_warnfunc(lambda *args: warnings.append(args))
+ #for docname in self.status_iterator(
+ # sorted(docnames), 'writing output... ', darkgreen, len(docnames)):
+ # doctree = self.env.get_and_resolve_doctree(docname, self)
+ # self.write_doc(docname, doctree)
+ from sage.parallel.decorate import parallel
+ import itertools
+ worker = parallel('fork')(self.write_doc_parallel_worker)
+ pariter = itertools.imap(lambda x:x[1], worker(sorted(docnames)))
for docname in self.status_iterator(
- sorted(docnames), 'writing output... ', darkgreen, len(docnames)):
- doctree = self.env.get_and_resolve_doctree(docname, self)
- self.write_doc(docname, doctree)
+ pariter, 'writing output... ', darkgreen, len(docnames)):
+ # done in the iterator !!!
+ pass
for warning in warnings:
self.warn(*warning)
self.env.set_warnfunc(self.warn)
+ def write_doc_parallel_worker(self, docname):
+ doctree = self.env.get_and_resolve_doctree(docname, self)
+ self.write_doc(docname, doctree)
+ return docname
+
def prepare_writing(self, docnames):
raise NotImplementedError The read part could be more tricky but it doesn't seems unfeasible. Note that I may be dreaming here. |
Experimental timing patch |
Attachment: timing.patch.gz Experimental parallel doc output patch |
comment:5
Attachment: paral.patch.gz Hi there, I just attached two patches. They need to be applied in
(I didn't regenerate a spkg yet). Those two packages are very experimental and
On a 24 core server:
Florent |
comment:6
With a little tunning I managed to have
Looks efficient ! |
comment:7
This should be closed as a duplicate for #6495. |
Reviewer: Florent Hivert |
This is a reminder ticket for mhansen.
CC: @mwhansen @craigcitro
Component: documentation
Keywords: documentation build sphinx parallel
Reviewer: Florent Hivert
Issue created by migration from https://trac.sagemath.org/ticket/6255
The text was updated successfully, but these errors were encountered: