-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Construct attribute nodes lazily #36697
Copy link
Copy link
Open
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-interesting-projectRepresents work that is expected to be interesting in some fashionRepresents work that is expected to be interesting in some fashionI-perf-bloatUnnecessary memory usage.Unnecessary memory usage.
Description
My intuition is that it's uncommon for web content to actually care about the Attribute nodes that can be obtained via getAttributeNode. Since we create one Attribute per content attribute during parsing, this could lead to nontrivial memory used on nodes that might never be accessed. If we only stored the content attribute values, and constructed Attribute nodes lazily instead, we might observe lower memory usage and slightly more efficient parsing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-interesting-projectRepresents work that is expected to be interesting in some fashionRepresents work that is expected to be interesting in some fashionI-perf-bloatUnnecessary memory usage.Unnecessary memory usage.