Search code examples
python-sphinxrestructuredtext

Will Sphinx (reStructuredText) document handle 1000 pages?


I have around 200 separate documents in MS Word, each being around 4-6 pages long.

Each document defines couple of terms, few images and few tables and source listings.

I am thinking of converting the documents into rst and integrating all of them into one large document using Sphinx documentation framework as it provides very good support for cross-linking.

As a result, I expect two artefacts:

  • Multipage HTML (built by make html)
  • Single PDF document (built by make latexpdf)

My question is: is it feasible with such large number of pages?

I would expect problems in following situations (some are critical, other not):

  • building resulting document (failing or taking rather long time to run).
  • using built-in full text search for HTML version.

Solution

  • That's slightly overkill, but I generated a .rst equivalent to 2100 pages of pdf (after translation by sphinx to pdf)

    The documents consists in 100 chapters, and each chapter holds 100000 random words from an English dictionary.

    And here is how sphinx behaves:

    % time make html
    sphinx-build -b html -d _build/doctrees   . _build/html
    Running Sphinx v1.3.1
    [...]
    Build finished. The HTML pages are in _build/html.
    make html  199.01s user 6.26s system 100% cpu 3:25.24 total
    

    So total build of ~ 3min. The resulting document is displayed properly by a recent version of firefox, and the search box generated by sphinx does not suffer from any noticeable slowdown.

    So I guess the answer is: yes, it is feasible.