From c082dec331bfc517cca4b26225553afab79f78f7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 9 Jan 2014 16:44:34 +0000 Subject: [PATCH] Profiling - Automatically profile etemplate2 loading in Chrome --- etemplate/js/etemplate2.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 3690fbc32a..f436494487 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -202,9 +202,12 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) { egw.window.console.groupCollapsed("Loading %s into ", _name, this.DOMContainer); } - if(console.timeStamp) + if(console.timeline) { - console.timeStamp("Load " + _name + " started"); + console.timeline(_name); + } + if(console.profile) + console.profile(_name); } var start_time = (new Date).getTime(); @@ -288,9 +291,13 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) { egw.window.console.groupEnd(); } - if(console.timeStamp) + if(console.timelineEnd) { - console.timeStamp("Load " + _name + " finished"); + console.timelineEnd(_name); + } + if(console.profileEnd) + { + console.profileEnd(_name); } if(deferred.length > 0) {