summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cheetah/Tests/Performance.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/cheetah/Tests/Performance.py b/cheetah/Tests/Performance.py
index 3dcd8c5..8101e85 100644
--- a/cheetah/Tests/Performance.py
+++ b/cheetah/Tests/Performance.py
@@ -123,6 +123,23 @@ class DynamicMethodCompilationTest(PerformanceTest):
template = template()
value = template.testMethod()
+
+class BunchOfWriteCalls(PerformanceTest):
+ iterations = 1000
+ def performanceSample(self):
+ template = '''
+ #import sys
+ #import os
+ #for i in xrange(1000)
+ $i
+ #end for
+ '''
+ template = Cheetah.Template.Template.compile(template,
+ keepRefToGeneratedCode=False)
+ template = template()
+ value = template.respond()
+ del value
+
class DynamicSimpleCompilationTest(PerformanceTest):
def performanceSample(self):
template = '''