forked from extern/egroupware
Profiling - Add some timestamps for timeline
This commit is contained in:
parent
64cc24815c
commit
13572c472a
@ -202,13 +202,16 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
{
|
{
|
||||||
egw.window.console.groupCollapsed("Loading %s into ", _name, this.DOMContainer);
|
egw.window.console.groupCollapsed("Loading %s into ", _name, this.DOMContainer);
|
||||||
}
|
}
|
||||||
|
if(console.timeStamp)
|
||||||
|
{
|
||||||
|
console.timeStamp("Load " + _name + " started");
|
||||||
|
}
|
||||||
|
var start_time = (new Date).getTime();
|
||||||
|
|
||||||
// require necessary translations from server, if not already loaded
|
// require necessary translations from server, if not already loaded
|
||||||
if (!$j.isArray(_data.langRequire)) _data.langRequire = [];
|
if (!$j.isArray(_data.langRequire)) _data.langRequire = [];
|
||||||
egw(currentapp, window).langRequire(window, _data.langRequire, function()
|
egw(currentapp, window).langRequire(window, _data.langRequire, function()
|
||||||
{
|
{
|
||||||
var start_time = (new Date).getTime();
|
|
||||||
|
|
||||||
// Appname should be first part of the template name
|
// Appname should be first part of the template name
|
||||||
var split = _name.split('.');
|
var split = _name.split('.');
|
||||||
var appname = split[0];
|
var appname = split[0];
|
||||||
@ -285,6 +288,10 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
{
|
{
|
||||||
egw.window.console.groupEnd();
|
egw.window.console.groupEnd();
|
||||||
}
|
}
|
||||||
|
if(console.timeStamp)
|
||||||
|
{
|
||||||
|
console.timeStamp("Load " + _name + " finished");
|
||||||
|
}
|
||||||
if(deferred.length > 0)
|
if(deferred.length > 0)
|
||||||
{
|
{
|
||||||
var still_deferred = 0;
|
var still_deferred = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user