Closed
Bug 1261726
Opened 8 years ago
Closed 4 years ago
Eliminate s{Methods,Attributes,...}_ids in generated DOM bindings code
Categories
(Core :: DOM: Bindings (WebIDL), defect, P3)
Core
DOM: Bindings (WebIDL)
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox48 | --- | affected |
People
(Reporter: n.nethercote, Unassigned)
References
Details
(Whiteboard: [MemShrink:P2] btpp-backlog [overhead:80k])
All the *_ids arrays in generated DOM bindings code currently take up 80+ KiB on 64-bit builds. They are used in two places of note. First, in XrayResolveAttribute() and XrayResolveMethod(). We use them for the "here is a jsid; find our corresponding JSPropertySpec or JSFunctionSpec" operation. We walk along the *_ids array checking for equality with the given id until we find the right index; we then use that to index into the JSFunctionSpec* or JSPropertySpec*. We could just walk the JSFunctionSpec*/JSPropertySpec* directly if we had a fast-ish way to compare a given jsid to the strings in those specs. Second, in XrayAttributeOrMethodKeys(), which produces all the ids involved. We could instead just create them from strings as we go. It'd only be hit when someone enumerates an Xray or does Object.getOwnPropertyNames on it, which probably isn't common. We would need some API for turning a string in a JSPropertySpec/JSFunctionSpec.
Updated•8 years ago
|
Whiteboard: [MemShrink] → [MemShrink] btpp-backlog
Updated•8 years ago
|
Whiteboard: [MemShrink] btpp-backlog → [MemShrink:P2] btpp-backlog
Comment 1•6 years ago
|
||
Note that some of the discussion in bug 786819 suggests ditching the strings from the specs and using the ids instead... Not clear how this would work on workers.
Updated•6 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Whiteboard: [MemShrink:P2] btpp-backlog → [MemShrink:P2] btpp-backlog [overhead:80k]
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•4 years ago
|
Component: DOM: Core & HTML → DOM: Bindings (WebIDL)
Reporter | ||
Comment 2•4 years ago
|
||
s{Methods,Attributes,...}_ids
no longer exist, so this bug is moot.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•