Open
Bug 1471879
Opened 7 years ago
Updated 3 years ago
Consider to use nsAutoString in those dictionaries which are only used as params
Categories
(Core :: DOM: Bindings (WebIDL), enhancement, P3)
Core
DOM: Bindings (WebIDL)
Tracking
()
NEW
People
(Reporter: smaug, Unassigned)
Details
See https://perfht.ml/2lComBg as an example. We allocate the string, and allocation is slow.
| Reporter | ||
Comment 1•7 years ago
|
||
Or could we use FakeStrings?
Comment 2•7 years ago
|
||
Hmm.
So we don't want to expose FakeString too much to consumers; it's a binding implementation detail that has to be used a bit carefully. I guess we already do via unions to some extent...
This used to not be ok because FakeString was a dependent string, but I guess nowadays it typically isn't when coming from JS.
Doing this for dictionaries in general is not too hard. Doing this only for ones used as args would require a bit more work; we don't track that right now.
Updated•7 years ago
|
Priority: -- → P3
Comment 3•7 years ago
|
||
So why the "only used as params" limitation? Is the idea to exclude return values? Or exclude members of other dictionaries, or sequence elements, or something else?
Flags: needinfo?(bugs)
| Reporter | ||
Comment 4•7 years ago
|
||
Just thinking if return value objects might be stored as member variables or something.
Basically want to somehow try avoid higher memory usage, if the object might be heap allocated.
Not sure what would be the best way for that.
Flags: needinfo?(bugs)
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•5 years ago
|
Component: DOM: Core & HTML → DOM: Bindings (WebIDL)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•