Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OK, people, this is what I got today on #pocoo:</p> <p>[20:59] zgoda: hello, i'd like to know if i could optimize my jinja2 environment creation process, the problem -> <a href="https://stackoverflow.com/questions/618827/optimizing-jinja2-environment-creation">Optimizing Jinja2 Environment creation</a></p> <p>[21:00] zgoda: i have profiler output from "cold" app -> <a href="http://paste.pocoo.org/show/107009/" rel="nofollow noreferrer">http://paste.pocoo.org/show/107009/</a></p> <p>[21:01] zgoda: and for "hot" -> <a href="http://paste.pocoo.org/show/107014/" rel="nofollow noreferrer">http://paste.pocoo.org/show/107014/</a></p> <p>[21:02] zgoda: i'm wondering if i could somewhat lower the CPU cost of creating environment for "cold" requests</p> <p>[21:05] mitsuhiko: zgoda: put the env creation into a module that you import</p> <p>[21:05] mitsuhiko: like</p> <p>[21:05] mitsuhiko: from yourapplication.utils import env</p> <p>[21:05] zgoda: it's already there</p> <p>[21:06] mitsuhiko: hmm</p> <p>[21:06] mitsuhiko: i think the problem is that the template are re-compiled each access</p> <p>[21:06] mitsuhiko: unfortunately gae is incredible limited, i don't know if there is much i can do currently</p> <p>[21:07] zgoda: i tried with jinja bytecache but it does not work on prod (its on on dev server)</p> <p>[21:08] mitsuhiko: i know</p> <p>[21:08] mitsuhiko: appengine does not have marshal</p> <p>[21:12] zgoda: mitsuhiko: thank you</p> <p>[21:13] zgoda: i was hoping i'm doing something wrong and this can be optimized...</p> <p>[21:13] mitsuhiko: zgoda: next release will come with improved appengine support, but i'm not sure yet how to implement improved caching for ae</p> <p>It looks Armin is aware of problems with bytecode caching on AppEngine and has some plans to improve Jinja2 to allow caching on GAE. I hope things will get better over time.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload