W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2009

Re: Mutation events - slowness examples

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sun, 07 Jun 2009 03:39:20 -0400
To: Fran├žois REMY <fremycompany_pub@yahoo.fr>, www-dom@w3.org
Message-ID: <op.uu48vse91ejg13@sandra-svwliu01>
On Sat, 06 Jun 2009 12:54:31 -0400, Fran├žois REMY  
<fremycompany_pub@yahoo.fr> wrote:

> Result on my computer :
>
> Test 1 (something is done by JScript)
>     IE:                     Not Applicable
>     FireFox:           30 > 160 (x5 or +130)
>     Chrome:           5 > 60 (x10 or +55)
>     Opera:              15 > 45 (x3 or +30)
>
> Test 2 (nothing is done by JScript, just for comparaison)
>     IE:                     Not Applicable
>     FireFox:           30 > 80 (x3 or +50)
>     Chrome:           5 > 40 (x8 or +35)
>     Opera:              15 > 30 (x2 or +15)
>
> There's cleary two factors that apply :
> ==> Time needed to move from managed C++ to unmanaged JScript
> ==> Time of JScript execution
>
> These two factors are clearly dependant of the browser.
> In FireFox, it seems there's clearly a problem with that.
> Others browsers react smartly enough.
>
> Regards,

Thanks

O.K., by just setting the DOMNodeInserted listener (and not doing anything  
in it), the .innerHTML operation takes 2.4 to 5.5 times as long for me  
depending on the browser. (Safari the least slowdown and Opera the most)

And, that's just for *one* registered DOMNodeInserted listener and just  
for the few nodes that are inserted in the test.

That seems like it sucks pretty bad.

However, when registering a DOMNodeInserted listener in User JS (in Opera  
for example) for all pages (and checking that it's actually firing), I  
can't seem to notice any slowdowns on sites like gmail, digg and reddit  
etc. What sites would be a good to test this on that should trigger  
noticeable slowdowns?

-- 
Michael
Received on Sunday, 7 June 2009 07:39:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:00 GMT