Bug 75071
| Summary: | Reduce per-attribute overhead by no longer heap-allocating Attribute objects | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | adamk, cdumez, cmarcelo, kling, koivisto, ojan, rniwa, sam |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Darin Adler
It seems that we do not need to heap-allocate Attribute objects. Reference counting each one seems like overkill. There must be a way to have the Vector of attributes contain the attributes themselves rather than just heap pointers. These are not variable-size objects.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
But Attribute objects are exposed to JavaScript and can be removed from / added back to NamedNodeMap. How are we going to do that if they were a part of NamedNodeMap?
Darin Adler
(In reply to comment #1)
> But Attribute objects are exposed to JavaScript and can be removed from / added back to NamedNodeMap. How are we going to do that if they were a part of NamedNodeMap?
Attr objects are exposed to JavaScript. Attribute objects are internal to WebKit and not exposed to JavaScript.
Darin Adler
(In reply to comment #2)
> (In reply to comment #1)
> > But Attribute objects are exposed to JavaScript and can be removed from / added back to NamedNodeMap. How are we going to do that if they were a part of NamedNodeMap?
>
> Attr objects are exposed to JavaScript. Attribute objects are internal to WebKit and not exposed to JavaScript.
Supporting Attr may still pose some challenges, but I am pretty sure that we don’t need to start doing all that heap allocating until people actually use Attr.
Ryosuke Niwa
This has been done in http://trac.webkit.org/changeset/114870 by anttik.
Antti Koivisto
By kling!
*** This bug has been marked as a duplicate of bug 83440 ***
Lucas Forschler
Mass moving XML DOM bugs to the "DOM" Component.