changeset 1145:2be5a05416bd

Added a few timers in Page, removed an except block that should be never used.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Mon, 07 Aug 2006 22:45:16 +0200
parents 1b5093cfc607
children 40059e38427a
files MoinMoin/Page.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Mon Aug 07 22:44:40 2006 +0200
+++ b/MoinMoin/Page.py	Mon Aug 07 22:45:16 2006 +0200
@@ -1385,6 +1385,7 @@
     def execute(self, request, parser, code):
         """ Write page content by executing cache code """            
         formatter = self.formatter
+        request.clock.start("execute")
         from MoinMoin.macro import Macro
         macro_obj = Macro(parser)        
         # Fix __file__ when running from a zip package
@@ -1396,6 +1397,7 @@
             exec code
         except "CacheNeedsUpdate": # convert the exception
             raise Exception("CacheNeedsUpdate")
+        request.clock.stop("execute")
 
     def loadCache(self, request):
         """ Return page content cache or raises 'CacheNeedsUpdate' """
@@ -1407,8 +1409,6 @@
         import marshal
         try:
             return marshal.loads(cache.content())
-        except "CacheNeedsUpdate": # convert old exception into a new one
-            raise Exception('CacheNeedsUpdate')
         except (EOFError, ValueError, TypeError):
             # Bad marshal data, must update the cache.
             # See http://docs.python.org/lib/module-marshal.html