Closed
Bug 499201
Opened 15 years ago
Closed 11 years ago
Need support for classes with virtual properties in jsapi
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bzbarsky, Assigned: peterv)
References
(Blocks 2 open bugs, )
Details
Attachments
(1 file)
987 bytes,
text/html
|
Details |
This is actually somewhat described in bug 497795, but to be more precise what we need is: 1) A way to flag objects as having IndexGetter/IndexSetter 2) A way to quickly ask the object what range of indices it supports, and a way for it to indicate "all integers". 3) For indices in the supported range, a way to quickly call the relevant getter/setter function. 4) Filing followup bugs to make our DOM classes use this. 5) Filing followup bugs to make the JS engine use this as needed. A key goal here is avoiding all the overhead of resolving the indices, then calling getters, etc. The premise is that all the index stuff will live on the object, not the proto, so we don't need all that overhead. I ran into a case where this seems like it would help when profiling the domJQueryAttributeFilters benchmark in the dom section of the peacekeeper benchmark. That code is doing Array.slice() on the return value of querySelectorAll, which ends up spending about 2/3 as much time as the querySelectorAll call did... Some of this might be xpconnect wrapping of the nodes, but some is just pure overhead.
![]() |
Reporter | |
Updated•15 years ago
|
Blocks: peacekeeper
![]() |
Reporter | |
Comment 1•15 years ago
|
||
![]() |
Reporter | |
Comment 2•14 years ago
|
||
https://wiki.mozilla.org/Platform/Performance:IndexGetterSetter
![]() |
Reporter | |
Updated•14 years ago
|
Updated•14 years ago
|
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Updated•14 years ago
|
Assignee: general → gal
Updated•14 years ago
|
Assignee: gal → peterv
blocking2.0: --- → betaN+
Summary: Need support for classes with IndexGetter/IndexSetter in jsapi → Need support for classes with virtual properties in jsapi
Updated•14 years ago
|
Comment 3•11 years ago
|
||
A lot has changed in the recent years. Is this bug still relevant, or are there different solutions?
Comment 4•11 years ago
|
||
At this point we're well along on doing what this bug wants with proxies. I don't think this bug's particularly useful any more -- proxy work would go in other bugs.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
![]() |
Reporter | |
Comment 5•11 years ago
|
||
We're well along to doing with proxies everything except the "fast" parts of comment 0. ;)
You need to log in
before you can comment on or make changes to this bug.
Description
•