Commits

Thomas Waldmann  committed 50cc68a

modify templates to not use 'with context' because this kills pypy's performance

this is due to use of sys._getframe by jinja2.

one also needs to patch logging/__init__.py of pypy and set _srcfile to None for
same reasons.

  • Participants
  • Parent commits f6ca659

Comments (0)

Files changed (3)

File MoinMoin/templates/base.html

 <!DOCTYPE html>{# this is html5, xmlish variant #}
-{%- import "snippets.html" as snippets with context %}
+{%- import "snippets.html" as snippets without context %}
 {%- set head = snippets.head() %}
 {%- set scripts = snippets.scripts() %}
 {%- set stylesheets = snippets.stylesheets() %}

File MoinMoin/templates/layout.html

-{% import "forms.html" as forms %}
+{% import "forms.html" as forms without context %}
 {% extends "base.html" %}
 
-{% import "snippets.html" as snippets with context %}
+{% import "snippets.html" as snippets without context %}
 {% set logo = snippets.logo() %}
 {% set before_header = snippets.before_header() %}
 {% set after_header = snippets.after_header() %}

File MoinMoin/templates/show.html

     {%- endif %}
 {% endblock %}
 
-{% import "itemviews.html" as itemviews with context %}
+{% import "itemviews.html" as itemviews without context %}
 
 {% block header_itemviews %}
     {{ itemviews }}