 
     start = new Date;
     action.call context, params, (err, template, data) ->
-      if (config && config.stashPerf) 
-        config.stashPerf(req, "data", new Date - start)
+      stashPerf(req, "data", new Date - start)
       return handleErr(err, req, res) if err
+
       start = new Date;
       res.render(template, locals: data, app: req.appContext, req: req)
-      if (config && config.stashPerf) 
-        config.stashPerf(req, "render", new Date - start)
-        config.stashPerf(req, "afterRenderTotalTime")
+      stashPerf(req, "render", new Date - start)
+      next()
 
 handleErr = (err, req, res) ->
   if (config && config.stashError) 

routes = require(paths.entryPath + '/routes')

config = null;

# given a name, eg "listings#show"
# return function that matches that controller's action (eg the show method of the listings controller)

    if routeInfo.authenticated && !req.appContext.loggedIn()
      res.redirect('/login')
    else
      stashPerf(req, "authenticate", new Date - start)
      next()

afterRender = () ->
  (req, res, next) ->
    if (config && config.afterRender)
      config.afterRender(req, res)
    # DO NOT CALL NEXT!  END FILTER CHAIN HERE

# config
# - stashError(req, err)
