Profiling - Automatically profile etemplate2 loading in Chrome

This commit is contained in:
Nathan Gray 2014-01-09 16:44:34 +00:00
parent 400240f1e4
commit c082dec331

View File

@ -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)
{