mirror of
https://github.com/wrabit/django-cotton.git
synced 2025-07-24 09:53:48 +00:00
tidy up of _component
This commit is contained in:
parent
45a89d774b
commit
a1aea69ba5
2 changed files with 108 additions and 112 deletions
|
@ -47,7 +47,7 @@ settings.configure(
|
|||
django.setup()
|
||||
|
||||
|
||||
def template_bench(template_name, iterations=1000):
|
||||
def template_bench(template_name, iterations=500):
|
||||
start_time = time.time()
|
||||
for _ in range(iterations):
|
||||
render_to_string(template_name)
|
||||
|
@ -57,7 +57,7 @@ def template_bench(template_name, iterations=1000):
|
|||
return duration, render_to_string(template_name)
|
||||
|
||||
|
||||
def template_bench_alt(template_name, iterations=1000):
|
||||
def template_bench_alt(template_name, iterations=500):
|
||||
data = list(range(1, iterations))
|
||||
start_time = time.time()
|
||||
render_to_string(template_name, context={"data": data})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue