W3C home > Mailing lists > Public > public-web-perf@w3.org > September 2012

performance.now in web workers

From: Chandler Prall <chandler.prall@gmail.com>
Date: Sun, 23 Sep 2012 23:26:56 -0600
Message-ID: <CABBemjjA2Wq9u+Q_3Tb8sTymSUpH_FVsNTRVhpWFb6vFQsogZg@mail.gmail.com>
To: public-web-perf@w3.org
As one of the headlining features about web workers is to use them for
performance gains it makes sense to expose the sub-millisecond resolution
`now` function to web workers. As has been discussed numerous times,
Date.now is unreliable and inaccurate even at the millisecond resolution
and these inaccuracies can have a strong impact on performance- and
accuracy-sensitive applications.

The `navigation` and `timing` properties on `window.performance` do not
make sense in a worker context, so perhaps attaching the `now` function to
a worker's `self` object is the most straightforward? I'm sure others will
have better ideas for the API of this functionality.
Received on Monday, 24 September 2012 07:58:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:33 UTC