Mercurial > piecrust2
diff piecrust/data/debug.py @ 96:0445a2232de7
Improvements and fixes to incremental baking.
* Better handling of the render pass during page rendering.
* Used sources are paired with the pass they were used in.
* Proper use and invalidation of the rendered segments cache based on render
passes.
* The `Assetor` is also better tracking what was used in a page.
* Add flags on a page to get better caching information for the debug window.
* Property invalidation of the previous bake record when needed.
* Better information about why pages are delayed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 07 Sep 2014 23:48:57 -0700 |
parents | 395eb38f2dfb |
children | d7a548ebcd58 |
line wrap: on
line diff
--- a/piecrust/data/debug.py Sun Sep 07 21:37:10 2014 -0700 +++ b/piecrust/data/debug.py Sun Sep 07 23:48:57 2014 -0700 @@ -4,6 +4,7 @@ import logging import collections from piecrust import APP_VERSION, PIECRUST_URL +from piecrust.page import FLAG_RAW_CACHE_VALID logger = logging.getLogger(__name__) @@ -60,7 +61,6 @@ def _do_build_debug_info(page, data, output): app = page.app - exec_info = app.env.exec_info_stack.current_page_info print('<div id="piecrust-debug-info" style="%s">' % CSS_DEBUGINFO, file=output) @@ -69,22 +69,18 @@ # If we have some execution info in the environment, # add more information. - if exec_info: - if exec_info.was_cache_valid: - output.write('baked this morning') - else: - output.write('baked just now') + if page.flags & FLAG_RAW_CACHE_VALID: + output.write('baked this morning') + else: + output.write('baked just now') - if app.cache.enabled: - if app.env.was_cache_cleaned: - output.write(', from a brand new cache') - else: - output.write(', from a valid cache') + if app.cache.enabled: + if app.env.was_cache_cleaned: + output.write(', from a brand new cache') else: - output.write(', with no cache') - + output.write(', from a valid cache') else: - output.write('no caching information available') + output.write(', with no cache') output.write(', ') if app.env.start_time != 0: