[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jamesr at google.com jamesr at google.com
Wed Dec 22 11:54:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 734cd9a12269cd1cc0a8f4d2f2e182cff9a13722
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 01:28:28 2010 +0000

    2010-08-10  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Darin Adler.
    
             fast/dom/Window/window-properties.html is pretty slow
             https://bugs.webkit.org/show_bug.cgi?id=43755
    
             window-properties.html would take 5.9 seconds to run on my Mac Pro.
             - Changing the order of checks in logValue to have more early returns
               before we get value and valueType brings this down to 3.66 seconds
             - Changing logBuffer to be a string that we append to instead of an
               array that we push() to brings this to 0.7 seconds (string appends
               are faster than array push()-es followed by a join('') in all
               browsers except IE per
               http://closure-library.googlecode.com/svn/docs/closure_goog_string_stringbuffer.js.source.html
    
            * fast/dom/Window/window-properties.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5c8c2fb..d920a65 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-10  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Darin Adler.
+
+         fast/dom/Window/window-properties.html is pretty slow
+         https://bugs.webkit.org/show_bug.cgi?id=43755
+         
+         window-properties.html would take 5.9 seconds to run on my Mac Pro.
+         - Changing the order of checks in logValue to have more early returns
+           before we get value and valueType brings this down to 3.66 seconds
+         - Changing logBuffer to be a string that we append to instead of an
+           array that we push() to brings this to 0.7 seconds (string appends
+           are faster than array push()-es followed by a join('') in all
+           browsers except IE per 
+           http://closure-library.googlecode.com/svn/docs/closure_goog_string_stringbuffer.js.source.html
+
+        * fast/dom/Window/window-properties.html:
+
 2010-08-10  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/fast/dom/Window/window-properties.html b/LayoutTests/fast/dom/Window/window-properties.html
index b60a368..e828d86 100644
--- a/LayoutTests/fast/dom/Window/window-properties.html
+++ b/LayoutTests/fast/dom/Window/window-properties.html
@@ -7,17 +7,16 @@ object, along with their types.</p>
 if (window.layoutTestController)
     layoutTestController.dumpAsText();
     
-var logBuffer = [];
+var logBuffer = '';
 function log(s)
 {
-    logBuffer.push(s);
+    logBuffer += s;
 }
 
 var pre = document.getElementById('pre');
 function flushLog()
 {
-    var logMessage = logBuffer.join("");
-    pre.appendChild(document.createTextNode(logMessage));
+    pre.appendChild(document.createTextNode(logBuffer));
 }
 
 function tryEval(string)
@@ -98,13 +97,6 @@ var __skip__ = {
 
 function logValue(valueName)
 {
-    var value = tryEval(valueName);
-    var valueType = typeOfNullAware(value);
-
-    // Don't taint the test with our own variables
-    if (value == logBuffer || value == pre)
-        return;
-
     // Don't taint the test with our own properties
     if (/__visitedByLogValue__/.test(valueName) || /__nameWhenVisitedByLogValue__/.test(valueName))
         return;
@@ -116,6 +108,14 @@ function logValue(valueName)
     if (/\.[0-9]/.test(valueName))
         return;
 
+    var value = tryEval(valueName);
+
+    // Don't taint the test with our own variables
+    if (value === logBuffer || value === pre)
+        return;
+
+    var valueType = typeOfNullAware(value);
+
     // Avoid infinite recursion
     if (valueType == "object" && value.__visitedByLogValue__) { //;
         log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
@@ -163,4 +163,5 @@ function logProperties(object, objectName)
 logValue('window');
 logValue('window.getSelection()');
 flushLog();
+
 </script>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list