Memory usage has nothing to do with size. I can artificially construct a 10MB document that would consume 4GB of RAM while converting, while a more "normal" 10MB document typically takes no more than a 100MB.
In the case of the python documentation, the document has the structure of a lot of relatively small HTML files with a single very large CSS that is referenced by all of them. In such a case, because of calibre's CSS flattening/font size normalization, the CSS has to be duplicated for every HTML file. Running a calibre conversion on a collection of HTML files is like opening every single one simultaneously in a different tab in a single browser.
|