W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] HTML5 (including next generation additions still in development) - Mozilla Firefox (Not Responding)

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 11 Aug 2010 18:17:03 -0700
Message-ID: <AANLkTi=45s6eNf1qDdjvYBWi_E2oSwwVDcUa5byt5PL1@mail.gmail.com>
On 8/11/10, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 8/11/10 11:48 AM, Boris Zbarsky wrote:
>> javascript:var start = new Date(); function f(n) { for (var k =
>> n.firstChild; k; k = n.nextSibling) f(k); } f(document); alert(new
>> Date() - start)
>
> Er, that had a typo.  The correct script is:
>
> javascript:var start = new Date(); function f(n) { for (var k =
> n.firstChild; k; k = k.nextSibling) f(k); } f(document); alert(new
> Date() - start);
>

My result is 1012 and that is significant and noticeable.

It's also highly contrived example. When you start doing any DOM
manipluation, particularly appending or removing nodes, you're going
to notice a lot larger times.

> Now the numbers are slightly larger; on the order of 230ms to 350ms.
> Barely above human lag-perception.  This is on a several-years-old
> laptop as hardware.


How do figure that's barely above human lag perception?

Garrett
Received on Wednesday, 11 August 2010 18:17:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:59 UTC