Web Inspector: Speedup heap snapshot loading.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 16:37:06 +0000 (16:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 16:37:06 +0000 (16:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81788

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-03-21
Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotLoader.prototype._parseNodes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshot.js

index 6bf05a134e6f7da35c12f1e3380bb3d41796c366..edb1f7b8abcdaec3c16952e74aa3897262a0df2f 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-21  Alexei Filippov  <alexeif@chromium.org>
+
+        Web Inspector: Speedup heap snapshot loading.
+        https://bugs.webkit.org/show_bug.cgi?id=81788
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/HeapSnapshot.js:
+        (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
+
 2012-03-21  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
index c4300393a6fcab3ab772c96f9fd2f5749027ddb9..9d78497140f8781b91c83b67f3bef7f3f575ebac 100644 (file)
@@ -110,18 +110,21 @@ WebInspector.HeapSnapshotLoader.prototype = {
                 this._json = "";
                 return true;
             }
+            var nextNumber = 0;
             var startIndex = index;
             while (index < length) {
                 var code = this._json.charCodeAt(index);
                 if (char0 > code || code > char9)
                     break;
+                nextNumber *= 10;
+                nextNumber += (code - char0);
                 ++index;
             }
             if (index === length) {
                 this._json = this._json.slice(startIndex);
                 return true;
             }
-            this._nodes.push(parseInt(this._json.slice(startIndex, index)));
+            this._nodes.push(nextNumber);
         }
     },