Closed
Bug 1042324
Opened 10 years ago
Closed 9 years ago
shumway.js mutating the [[Prototype]] of an object will cause your code to run very slowly
Categories
(Firefox Graveyard :: Shumway, defect)
Firefox Graveyard
Shumway
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: cpeterson, Unassigned)
References
Details
The following JS warning is logged in the web console when loading Shumway:
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create shumway.js:1419
Waldo added this warning in bug 948227.
Comment 1•10 years ago
|
||
We're aware of this, and hopefully it won't bite us too hard. We mutate the prototype to make TypeScript constructor functions behave like ActionScript classes, thus integrating the two type systems.
Comment 2•10 years ago
|
||
Yeah, I benchmarked this a while ago, and it doesn't cause a slowdown in this case.
I disagree with Waldo on whether we should *always* spew this message, fwiw. There are usages of __proto__ that can well be optimized in the engine (essentially, everything that happens in cold code before TI starts recording type information).
Waldo just thinks we should try to fight __proto__ usage, period. I think that's a lost fight and we shouldn't scare devs into thinking our browser is worse here than others.
Comment 3•9 years ago
|
||
We don't do this anymore. \o/
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•