WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
91531
Web Inspector: intern strings when processing timeline records
https://bugs.webkit.org/show_bug.cgi?id=91531
Summary
Web Inspector: intern strings when processing timeline records
Andrey Kosyakov
Reported
2012-07-17 12:01:46 PDT
This adds StringPool class and uses it to intern all strings occurring in Timeline records. This cuts heap size from 117M to 50M when processing a 97M timeline log.
Attachments
Patch
(3.40 KB, patch)
2012-07-17 12:13 PDT
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(4.55 KB, patch)
2012-07-18 06:09 PDT
,
Andrey Kosyakov
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2012-07-17 12:13:52 PDT
Created
attachment 152803
[details]
Patch
Pavel Feldman
Comment 2
2012-07-17 13:05:28 PDT
Comment on
attachment 152803
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152803&action=review
> Source/WebCore/inspector/front-end/utilities.js:729 > + deepIntern: function(obj)
internObject?
> Source/WebCore/inspector/front-end/utilities.js:737 > + this.deepIntern(obj[field]);
Do you want to introduce a re-entrance guard here to say support up to 100 levels? Stack overflow is sometimes hard to debug.
Andrey Adaikin
Comment 3
2012-07-18 00:29:39 PDT
Comment on
attachment 152803
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152803&action=review
> Source/WebCore/inspector/front-end/utilities.js:711 > + intern: function(string)
what if string is equal to "__proto__" or "constructor" or "toString" or etc. ? maybe add (this._strings.__proto__ = null) to the constructor and reset() methods?
>> Source/WebCore/inspector/front-end/utilities.js:729 >> + deepIntern: function(obj) > > internObject?
a test case: var obj = {}; obj.foo = obj; pool.deepIntern(obj);
Andrey Kosyakov
Comment 4
2012-07-18 06:09:18 PDT
Created
attachment 153002
[details]
Patch
Pavel Feldman
Comment 5
2012-07-18 06:23:58 PDT
Comment on
attachment 153002
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=153002&action=review
> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:635 > + if (!this._details)
Is this a part of a different change?
> Source/WebCore/inspector/front-end/utilities.js:729 > + if (string === "__proto__")
What does this mean?
> Source/WebCore/inspector/front-end/utilities.js:741 > + this._strings = { __proto__: null };
Object.create(null)
Andrey Kosyakov
Comment 6
2012-07-18 06:46:43 PDT
Committed
r122964
: <
http://trac.webkit.org/changeset/122964
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug