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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 24 September 2012 07:58:57 GMT