Re: Mutation events - slowness examples

Jonas Sicking wrote:
> On Wed, Jun 24, 2009 at 8:52 PM, Sean Hogan<shogun70@westnet.com.au> wrote:
>   
>> I've made a couple of tests pages for DOMAttrModified (attached).
>>
>> test4.html modifies (1024 times) the title on an empty div and measures
>> execution time without / with DOMAttrModified listener.
>>
>> test5.html modifies (16 times) the title on a populated div.
>> Additionally, the contents of the div are styled based on the title. eg
>> div[title="After"] ul li {...}
>>
>> The repetition counts are chosen to get reasonable timing data.
>>
>> Results (approx)
>> test4:
>> Firefox: 25ms -> 120ms
>> Opera: 35ms -> 120ms
>>
>> test5:
>> Firefox: 43ms -> 48ms
>> Opera: 50ms -> 50ms
>>
>> Note: Safari doesn't trigger DOMAttrModified events.
>>
>> Conclusion (tentative):
>> The non-JS overhead of DOMAttrModified events is irrelevant to the UX, being
>> well under 1ms per event.
>>     
>
> I'm not sure I follow, 25ms -> 120ms seems quite relevant.
>
> / Jonas
>
>   
95ms for 1024 events. That's less than 0.1ms per event, which is why I 
would say irrelevant to user-experience.
How would you define "irrelevant to the user experience" and do you 
think any alternative could do significantly better?

Received on Thursday, 25 June 2009 06:54:43 UTC