RESOLVED INVALID 102813
Web Inspector: DataGrid: avoid repetitive access to node data field.
https://bugs.webkit.org/show_bug.cgi?id=102813
Summary Web Inspector: DataGrid: avoid repetitive access to node data field.
eustas.bug
Reported 2012-11-20 07:05:17 PST
DataGridNode.data is a getter. Each access to "data" causes construction of object that contains presentation values for all fields. There are few loops in which this field is accessed repetitively. With this patch in most loops "data" result reused.
Attachments
Patch (9.38 KB, patch)
2012-11-20 07:07 PST, eustas.bug
no flags
Patch (10.42 KB, patch)
2012-11-20 07:11 PST, eustas.bug
pfeldman: review-
eustas.bug
Comment 1 2012-11-20 07:07:52 PST
eustas.bug
Comment 2 2012-11-20 07:11:18 PST
Pavel Feldman
Comment 3 2012-11-22 12:28:04 PST
Comment on attachment 175214 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175214&action=review > Source/WebCore/ChangeLog:9 > + Each access to "data" causes construction of object that Could you explain what object is constructed? I can only see get data() { return this._data; }, in WebInspector.DataGridNode.prototype. This does not cost anything.
eustas.bug
Comment 4 2012-11-22 18:44:11 PST
Comment on attachment 175214 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175214&action=review >> Source/WebCore/ChangeLog:9 >> + Each access to "data" causes construction of object that > > Could you explain what object is constructed? I can only see > > get data() > { > return this._data; > }, > > in WebInspector.DataGridNode.prototype. This does not cost anything. Most classes that extend DataGridNode override this getter with one that construct object.
Brian Burg
Comment 5 2014-12-12 13:40:47 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests. Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.
Note You need to log in before you can comment on or make changes to this bug.