Hi,
the question is how you organized your files. When you say "the output
files are enormous big", what exactly do you mean? Of course the HTML
will be bigger than the text file, due to added markup, but that should
not amount to more than, say, a factor of 3.
Are you by chance working with lots of "include" directives, making
one big document out of multiple files?
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iEYEARECAAYFAk8HESgACgkQN9GcIYhpnLDGVwCfRb0L8nrz3rN+kpaIVFLGvq2x
xSMAn3dtBqZmnjP7Fz/Xo2blVovoVbxG
=1Tw/
-----END PGP SIGNATURE-----
> Hi all, I am new to sphinx, I am trying to convert massive plain text
> files to well-organized html, not program documentation, just some
> plain text record.
> The source text files is about 116 MB
...
> eventually eats all my memory ( 1.5 GB ), returning MemoryError, abort
> the build process
This is gigantic. How many lines are this?
> I've tried to build with less files( 9.8 M ), sucessfully create
> beautiful html,
In the docutils-users list
http://docutils.sourceforge.net/docs/user/mailing-lists.html#docutils-users
is a recent thread with exactly this problem: even with input files of
about 4 Mb, compilation took half an hour.
Investigation showed that the Docutils parser does not scale well - Docutils
is simply not built for massive input files.
As Sphinx uses Docutils for the document conversion, the problem should be
the same here.
> Is there any way to reduce memory usage in building
* No easy way. You might try to fix some issues in the Docutils
parser/writer but the developers currently have no ressources to deal with
this.
* The recommended way is to split the document into separate documents.
Sphinx provides good support for inter-document links.
> and the file size of output html ?
* does the html size scale linear with the input file size?
* you might consider converting to e.g. epub, which is basically zipped HTML.
Günter
On 07/01/12 07:54, Neck Acm wrote:
> With 116 mb source file, the _build directory is 669 mb after sphinx-
> build aborted the build process
If you just want to get something built then I suggest trying using a 64
bit operating system (you are almost certainly using a 64 bit capable
processor).
When you use a 32 bit operating system the Python process will be limited
to approximately 2GB of address space (wiggle room varies based on OS,
shared libraries and other details). It looks like it is the address
space that you are running out of.
If you use a 64 bit operating system then address space is considerably
larger. However you may run out of swap space so it is good idea to
configure with lots of it.
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk8JMhEACgkQmOOfHg372QTjdACgyIgLOxjACRl2GQMoANM4Nfy6
toIAmgMN+nu/qRU57738V5uTHoJd/hc3
=R+F9
-----END PGP SIGNATURE-----