# HG changeset patch # User Ludovic Chabant # Date 1512016869 28800 # Node ID 3c669bb9498e485a30989461794b33bb78dfb727 # Parent c4cfbbeed72e77d1bcd2f705ca2b903661129f75 bake: Don't cheat when profiling. diff -r c4cfbbeed72e -r 3c669bb9498e piecrust/commands/builtin/baking.py --- a/piecrust/commands/builtin/baking.py Wed Nov 29 20:38:15 2017 -0800 +++ b/piecrust/commands/builtin/baking.py Wed Nov 29 20:41:09 2017 -0800 @@ -75,6 +75,9 @@ import gc gc.collect() logger.info("---- %d/%d ----" % (i + 1, num_iter)) + # Don't cheat -- the app instance caches a bunch of stuff + # so we need to create a fresh one. + ctx.app = ctx.appfactory.create() try: records = self._doBake(ctx, out_dir)