title: Speed optimisation in Flask
body: <p>My project (Python 2.7) consists of a screen scraper that collects data once a day, extracts what is useful and stores that in a couple of pickles. The pickles are rendered to an HTML-page using Flask/Ninja. All that works, but when running it on my localhost (Windows 10), it's rather slow. I plan to deploy it on PythonAnywhere. </p>
  
  <p>The site also has an about page. Content for the about page is a markdown file, that I convert to HTML using <code>markdown2</code> after each edit. The about-template loads the HTML, like so: </p>
  
  <pre><code>{% include 'about_content.html' %}
  </code></pre>
  
  <p>This loads <em>much</em> faster than letting <code>Flask-Markdown</code> render the about-text (as I had at first): </p>
  
  <pre><code>{% filter markdown %}
  {% include 'about_content.md' %}
  {% endfilter %}
  </code></pre>
  
  <p>Now then. I'm a bit worried that the main page will not load fast enough when I deploy the site. The content gets updated only once a day, there is no need to re-render anything if you refresh the main page. So I'm wondering if I can do a similar trick as with the about-content:  </p>
  
  <p>Can I let Flask, after rendering the pickles, save the result as html, and then serve that from the site deployed? Or can I invoke some browser module, save its output, and serve that? Or is that a bad idea altogether, and shouldn't I worry because Flask is zoomingly fast on real life servers? </p>