Changes between Initial Version and Version 1 of Ticket #9114


Ignore:
Timestamp:
Apr 12, 2009, 6:26:34 AM (11 years ago)
Author:
Eugene Lazutkin
Comment:

Probably you forgot that Bill complained about a similar problem (or maybe this very problem) during the last dojo meeting. According to him there is a measurable difference between using properties on dojo and mydojo, where the latter is defined something like this:

// let's copy dojo
var mydojo = dojo.mixin({}, dojo);

My uneducated guess was that while building dojo a hash table underneath got overflown several times leading to a degraded structure (e.g., multiple linear lists to hold chunks, overflown hash chains, or excessive holes). Apparently the problem is solved by copying, which leads to some compacting under the hood.

I promised to investigate the problem and get some solid benchmark data first. It looks like you already started on the path to the solution. Let me know if you want to investigate it on your own, so I'll work on something else from my plate.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9114 – Description

    initial v1  
    1 There's something really funky going on with our TaskSpeed results on IE 6. It seems that calls like "dojo.byId" are going incredibly slowly when defined inside of Dojo, but when referenced with local aliases, they speed up dramatically. This is most pronounced on the addclass-odd test. The cause deserves more investigation, but the short-term outcome is that creating local aliases for things which don't need "this" references interally can speed up IE dramatically.
     1There's something really funky going on with our !TaskSpeed results on IE 6. It seems that calls like "dojo.byId" are going incredibly slowly when defined inside of Dojo, but when referenced with local aliases, they speed up dramatically. This is most pronounced on the addclass-odd test. The cause deserves more investigation, but the short-term outcome is that creating local aliases for things which don't need "this" references interally can speed up IE dramatically.