title: Running out of memory on ReadTheDocs
body: <p>I have a project on ReadTheDocs.</p>
  
  <p>As part of the documentation generation, I have Sphinx compile a large number of images using matplotlib's <a href="https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/sphinxext/plot_directive.py" rel="nofollow noreferrer">plot directive</a> showing what various commands do. It seems this takes more memory than RTD allocates for a build process. I'm trying to figure out what to do about this.</p>
  
  <p>Thoughts I have:</p>
  
  <ol>
  <li><p>I could pay RTD to increase my memory limit. But I am a small developer working on an as-yet boutique analysis tool, and their plan is pricey.</p></li>
  <li><p>I could switch to a smaller dataset for my figure generation and hope this uses less memory. This kind of guess-and-check strategy is frustrating and may not be sustainable anyway, if the number of images increases or the computational complexity increases.</p></li>
  <li><p>I could commit statically generated images to the existing repo and hack together an extension that generates new images only if the static image is not already present. But I do not like this because now my code repo will grow every time the images need to be changed for some reason, and I prefer to keep the repo light-weight.</p></li>
  <li><p>I could commit the compiled documentation to a separate repo of some sort and upload that to RTD. This prevents the code repo from growing every time an image changes. However, I'm not sure how to tell RTD about this documentation.</p></li>
  </ol>
  
  <p>What is a good way to include computationally-expensive auto-generated images in a ReadTheDocs project?</p>