diff piecrust/rendering.py @ 904:cc2647360036

internal: Remove unnecessary timer, add timer for lazy data building.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 23 Jul 2017 08:25:45 -0700
parents d6d35b2efd04
children f2b75e4be981
line wrap: on
line diff
--- a/piecrust/rendering.py	Sun Jul 23 08:24:11 2017 -0700
+++ b/piecrust/rendering.py	Sun Jul 23 08:25:45 2017 -0700
@@ -284,14 +284,13 @@
 
 
 def _build_render_data(ctx):
-    with ctx.app.env.stats.timerScope("PageDataBuild"):
-        data_ctx = DataBuildingContext(ctx.page, ctx.sub_num)
-        data_ctx.pagination_source = ctx.pagination_source
-        data_ctx.pagination_filter = ctx.pagination_filter
-        page_data = build_page_data(data_ctx)
-        if ctx.custom_data:
-            page_data._appendMapping(ctx.custom_data)
-        return page_data
+    data_ctx = DataBuildingContext(ctx.page, ctx.sub_num)
+    data_ctx.pagination_source = ctx.pagination_source
+    data_ctx.pagination_filter = ctx.pagination_filter
+    page_data = build_page_data(data_ctx)
+    if ctx.custom_data:
+        page_data._appendMapping(ctx.custom_data)
+    return page_data
 
 
 def _do_render_page_segments_from_ctx(ctx):