[richfaces-svn-commits] JBoss Rich Faces SVN: r1291 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Jun 25 08:24:53 EDT 2007
Author: dmorozov
Date: 2007-06-25 08:24:52 -0400 (Mon, 25 Jun 2007)
New Revision: 1291
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Add performance tuning logs
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 11:26:58 UTC (rev 1290)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 12:24:52 UTC (rev 1291)
@@ -19,6 +19,7 @@
eventOnPostSort: {},
initialize: function(options) {
+ this.startInitTime = (new Date()).getTime();
this.options = options;
this.client_id = this.options.client_id;
@@ -33,15 +34,9 @@
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
];
this.init2 = this.init.bindAsEventListener(this);
-
- this.eventOnPostSort = new ClientUI.common.utils.CustomEvent('OnSort');
- this.eventOnPostScroll = new ClientUI.common.utils.CustomEvent('OnScroll');
-
- this.startUpTime = new Date().getTime();
-
+
+ this.endInitTime = (new Date()).getTime();
this.rowCallbacks = [];
-
-// this.init()
},
// initialize parent Grid
@@ -50,22 +45,29 @@
// mark that grid control initialized
if(!this.isInitialized) {
this.isInitialized = true;
-
+
+ this.startCreateTime = (new Date()).getTime();
+
ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
+ this.endCreateTime = (new Date()).getTime();
+
// suspend some processing
- setTimeout(function(){
+ setTimeout(function() {
+ this.startPostProcessTime = (new Date()).getTime();
+
+ this.eventOnPostSort = new ClientUI.common.utils.CustomEvent('OnSort');
+ this.eventOnPostScroll = new ClientUI.common.utils.CustomEvent('OnScroll');
+
var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
this.setProgressCtrl(progress);
Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
if (this.options.selectionInput) {
this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
}
- }.bind(this), 500);
-
- if (this.startUpTime) {
- ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
- }
+
+ this.endPostProcessTime = (new Date()).getTime();
+ }.bind(this), 500);
}
},
More information about the richfaces-svn-commits
mailing list