Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Issue 328243005: Remove attrNodeListMap. (Closed)

Created:
6 years, 6 months ago by tkent
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Project:
blink
Visibility:
Public.

Description

Remove AttrNodeListMap. Change the ownership of AttrNodeList from a static HashMap to ElementRareData. ElementRareData size increases by this change. A complex web page will have slight increase of memory consumption even if the page doesn't use Attr nodes. BUG=357163, 381629 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176366

Patch Set 1 #

Patch Set 2 : Don't increase the size of ElementRareData #

Total comments: 13

Patch Set 3 : PS1 + minor fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -68 lines) Patch
M Source/core/dom/Attr.h View 2 chunks +1 line, -8 lines 0 comments Download
M Source/core/dom/Attr.cpp View 1 chunk +1 line, -7 lines 0 comments Download
M Source/core/dom/Element.h View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/dom/Element.cpp View 1 2 6 chunks +28 lines, -50 lines 0 comments Download
M Source/core/dom/ElementRareData.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M Source/core/dom/ElementRareData.cpp View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M Source/core/dom/TreeScopeAdopter.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 31 (0 generated)
tkent
Please review this. The static HashMap was introduced by http://trac.webkit.org/changeset/114870, and no one have tried ...
6 years, 6 months ago (2014-06-16 08:23:07 UTC) #1
tkent
> Dromaeo DOM Attributes test: > > Without this CL: > *RESULT dom_attr: dom_attr= 506.015387438 ...
6 years, 6 months ago (2014-06-16 08:28:25 UTC) #2
haraken
On 2014/06/16 08:23:07, tkent wrote: > Please review this. > > The static HashMap was ...
6 years, 6 months ago (2014-06-16 08:29:23 UTC) #3
Mads Ager (chromium)
This was my initial reaction as well. However, I measured the memory overhead before doing ...
6 years, 6 months ago (2014-06-16 08:39:43 UTC) #4
tkent
I haven't measure memory consumption change yet. - IMO, we don't need to worry about ...
6 years, 6 months ago (2014-06-16 08:40:29 UTC) #5
Mads Ager (chromium)
On 2014/06/16 08:40:29, tkent wrote: > I haven't measure memory consumption change yet. > - ...
6 years, 6 months ago (2014-06-16 08:42:47 UTC) #6
tkent
On 2014/06/16 08:39:43, Mads Ager (chromium) wrote: > This was my initial reaction as well. ...
6 years, 6 months ago (2014-06-16 08:43:07 UTC) #7
haraken
> I haven't measure memory consumption change yet. > - IMO, we don't need to ...
6 years, 6 months ago (2014-06-16 08:44:03 UTC) #8
Mads Ager (chromium)
On 2014/06/16 08:43:07, tkent wrote: > On 2014/06/16 08:39:43, Mads Ager (chromium) wrote: > > ...
6 years, 6 months ago (2014-06-16 08:50:47 UTC) #9
tkent
On 2014/06/16 08:50:47, Mads Ager (chromium) wrote: > On 2014/06/16 08:43:07, tkent wrote: > > ...
6 years, 6 months ago (2014-06-16 08:53:20 UTC) #10
tkent
Confirmed Dromaeo didn't use Attr objects. On 2014/06/16 08:40:29, tkent wrote: > Another idea is ...
6 years, 6 months ago (2014-06-16 23:53:03 UTC) #11
tkent
On 2014/06/16 08:53:20, tkent wrote: > I have found a way to add AttrNodeList to ...
6 years, 6 months ago (2014-06-16 23:53:32 UTC) #12
haraken
https://codereview.chromium.org/328243005/diff/20001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/328243005/diff/20001/Source/core/dom/Element.cpp#newcode2966 Source/core/dom/Element.cpp:2966: if (AttrNodeList* attrNodeList = this->attrNodeList()) Rename the |attrNodeList| variable ...
6 years, 6 months ago (2014-06-17 02:07:02 UTC) #13
haraken
+Elliott
6 years, 6 months ago (2014-06-17 02:08:17 UTC) #14
tkent
Regardless of the Oilpan leak issue, I think this CL is better than the static ...
6 years, 6 months ago (2014-06-17 06:47:50 UTC) #15
Mads Ager (chromium)
On 2014/06/17 06:47:50, tkent wrote: > Regardless of the Oilpan leak issue, I think this ...
6 years, 6 months ago (2014-06-17 07:43:57 UTC) #16
haraken
On 2014/06/17 07:43:57, Mads Ager (chromium) wrote: > On 2014/06/17 06:47:50, tkent wrote: > > ...
6 years, 6 months ago (2014-06-17 08:03:27 UTC) #17
esprehn
I'm surprised there's a memory usage increase here. Touching element.attributes already allocates a rare data, ...
6 years, 6 months ago (2014-06-17 08:27:05 UTC) #18
Mads Ager (chromium)
The latest patch set does not increase size because Kent has combined the two fields ...
6 years, 6 months ago (2014-06-17 08:32:31 UTC) #19
Mads Ager (chromium)
https://codereview.chromium.org/328243005/diff/20001/Source/core/dom/ElementRareData.cpp File Source/core/dom/ElementRareData.cpp (right): https://codereview.chromium.org/328243005/diff/20001/Source/core/dom/ElementRareData.cpp#newcode93 Source/core/dom/ElementRareData.cpp:93: #endif On 2014/06/17 08:27:05, esprehn wrote: > This code ...
6 years, 6 months ago (2014-06-17 08:35:09 UTC) #20
Mads Ager (chromium)
Looking at this again I like patch set 2. For patch set 2 we are ...
6 years, 6 months ago (2014-06-17 08:45:10 UTC) #21
Mads Ager (chromium)
Kent, as a sanity check, could you measure the amount of AttrData objects that you ...
6 years, 6 months ago (2014-06-17 09:49:04 UTC) #22
esprehn
The only way I see to use AttrNodeList without using the NamedNodeMap is to use ...
6 years, 6 months ago (2014-06-17 11:06:04 UTC) #23
Mads Ager (chromium)
On 2014/06/17 11:06:04, esprehn wrote: > The only way I see to use AttrNodeList without ...
6 years, 6 months ago (2014-06-17 11:40:22 UTC) #24
haraken
> > I don't think we should care much > > about that. I'm also ...
6 years, 6 months ago (2014-06-17 11:46:30 UTC) #25
tkent
Everyone, thank you for comments. I agree that we should try the simplest solution first, ...
6 years, 6 months ago (2014-06-17 23:42:32 UTC) #26
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 6 months ago (2014-06-18 00:15:54 UTC) #27
tkent
The CQ bit was unchecked by tkent@chromium.org
6 years, 6 months ago (2014-06-18 00:16:02 UTC) #28
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 6 months ago (2014-06-18 00:18:41 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/328243005/40001
6 years, 6 months ago (2014-06-18 00:19:39 UTC) #30
commit-bot: I haz the power
6 years, 6 months ago (2014-06-18 00:23:45 UTC) #31
Message was sent while issue was closed.
Change committed as 176366

Powered by Google App Engine
This is Rietveld 408576698