[Jifty-commit] r1682 - jifty/trunk/share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Jul 27 14:36:34 EDT 2006


Author: nelhage
Date: Thu Jul 27 14:36:31 2006
New Revision: 1682

Modified:
   jifty/trunk/share/web/static/js/behaviour.js

Log:
Removing profiling code from behaviour.js

Modified: jifty/trunk/share/web/static/js/behaviour.js
==============================================================================
--- jifty/trunk/share/web/static/js/behaviour.js	(original)
+++ jifty/trunk/share/web/static/js/behaviour.js	Thu Jul 27 14:36:31 2006
@@ -31,10 +31,7 @@
 JSAN.use("Upgrade.Array.push");
 
 var Behaviour = {
-    searchTimes: {},
-    applyTimes: {},
-    elements: {},
-    list: new Array(),
+    list: [],
     
     register: function(sheet) {
         Behaviour.list.push(sheet);
@@ -43,40 +40,19 @@
     apply: function() {
 	var root = arguments[0];
 	if(root) root = $(root);
-	var _applyStart = new Date();
 
         for (var h = 0; sheet = Behaviour.list[h]; h++) {
             for (var selector in sheet) {
 		var start = new Date();
                 var elements = cssQuery(selector, root);
-		var searchDone = new Date();
-		Behaviour.searchTimes[selector] = searchDone - start;
-		Behaviour.elements[selector] = elements;
-                
+
                 if ( !elements ) continue;
 
                 for (var i = 0; element = elements[i]; i++) {
                     sheet[selector](element);
 		}
-		Behaviour.applyTimes[selector] = new Date() - searchDone;
             }
         }
-	if(0) {
-	    document.write('<h2>Search times:</h2>');
-	    document.write('<pre>');
-	    for(var k in Behaviour.searchTimes) {
-		document.write(Behaviour.searchTimes[k] + '\t' + k + '<br />');
-	    }
-	    document.write('</pre>');
-	    
-	    document.write('<h2>Apply times:</h2>');
-	    document.write('<pre>');
-	    for(var k in Behaviour.applyTimes) {
-		document.write(Behaviour.applyTimes[k] + '\t' + k + '<br />');
-	    }
-	    document.write('</pre>');
-	}
-	//alert("Applied behaviours in " + (new Date() - _applyStart) + "ms");
     }
 }    
 


More information about the Jifty-commit mailing list