Closed Bug 1089300 Opened 10 years ago Closed 14 days ago

Investigating using Proxies instead of copies for fixArray

Categories

(MailNews Core :: MIME, defect)

x86_64
All
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jcranmer, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Object duplication can be expensive, especially since we're iterating over prototype slots so we can set the prototype. Creating a new Proxy wrapper should be faster, especially because the properties which require more than forwarding the get to the underlying property are likely to be more rarely called.
Keywords: perf
OS: Linux → All

should we expect fixing this to be less difficult than the work needed to finish bug 1005413, with equal or better performance win?

from bug 1055077 comment 16

"> - recipient+sender+subject (<5sec, 225 hits)

http://people.mozilla.org/~bgirard/cleopatra/
?1414243934911#report=e1dca35ebe3369ff209382fa959f1f96336be903

Over here, I see fixArray is fairly expensive. Considering that I expect toString is rather little called (which is the main point of fixArray), I suspect I can probably make this much cheaper by using proxies for toString instead of resetting prototypes. It's a bit nasty to code, but it should improve performance."

Flags: needinfo?(Pidgeot18)
Severity: normal → S3

fixArray is long gone.

Status: NEW → RESOLVED
Closed: 14 days ago
Flags: needinfo?(Pidgeot18)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.