Replies: 2 comments 3 replies
-
Apparently, it is the "writing output" phase which takes really a long time. I know Sphinx quite well and I can't understand why it could be slowed down by the overlay of Jupyter Book... Any insights? |
Beta Was this translation helpful? Give feedback.
-
I think what I'd try to do is copy the configuration that Jupyter Book uses as much as possible (see https://github.com/executablebooks/jupyter-book/blob/master/jupyter_book/sphinx.py#L51 for where we call Sphinx and generate the config for it). Then see if the slow-down occurs, and finally start deactivating an extension here and there to make it happen. A quick thought - could there also be a cacheing issue or something? I've found Jupyter Book to be a bit unreliable in whether it decides to "rebuild all pages" vs. "just rebuild updated pages"...I'm not sure if we've fixed this yet, but just an idea to look into. |
Beta Was this translation helpful? Give feedback.
-
Hello there,
I've been using Sphinx for years, to build my personal website.
It has about 150 pages, ~100 images, and about a dozen pages use Sphinx extensions like autorun, gnuplot, graphviz etc, and thus require compile time computations. (the sources are here).
Also some pages use autorun/runblock to show examples of
ping
,dig
, Python, OCaml and Bash code, and also command lines utilities that fetch online results (for instance from Wolfram|Alpha).Building from scratch on my laptop takes less than 120 seconds, even with no cache and an empty _build/ folder:
This time includes sending the pages to two web-servers!
I've started to use Jupyter Book yesterday, and I'm starting by writing a demo book, before trying to use it for my future teaching resources. So far, the example book is tiny, as I don't want to spend weeks on writing content if I'm not 100% satisfied of the result.
I love how it looks, the extensions, the MyST language, the fact that it can read and process Jupyter notebooks etc.
I use it in French, and this morning I submitted a tiny pull request to update the French translation of sphinx-book-theme.
But I'm really sad to see that it takes ages to build, even this tiny project takes much, much longer than my large and heavy websites, and my CPU even starts to blow and warns me that it's used at 100% by a process:
The sources contain 5 small .ipynb notebooks, a couple of Markdown, rST and MyST pages, almost no images, no notebooks to build, nothing that needs to fetch results from Internet... and the displayed time is just for building the HTML pages, not even sending them or anything else.
My example book is there: https://github.com/Info-Prepas-MP2I/Modele-de-livre-avec-Jupyter-Book/
If anyone has insights to know why the Jupyter-book build is that much slower than a Sphinx build...
Thanks in advance!
-- @Naereen
Beta Was this translation helpful? Give feedback.
All reactions