W3C home > Mailing lists > Public > public-web-perf@w3.org > June 2011

Re: ISSUE-6: (duplicate callbacks): Spec needs to clarify expected behavior for duplicate calls of the same callback [Request Animation Frame]

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 1 Jun 2011 09:23:22 -0700
Message-ID: <BANLkTinbPqcERdUhxdrQw3X9o-+_dimL4Q@mail.gmail.com>
To: Jatinder Mann <jmann@microsoft.com>
Cc: Cameron McCormack <cam@mcc.id.au>, Web Performance Working Group WG <public-web-perf@w3.org>
On Wednesday, June 1, 2011, Jatinder Mann <jmann@microsoft.com> wrote:
> Cameron,
>
> When I raised this issue, I was actually hoping that we would consider removing duplicate callbacks from the animation frame request callback list, if multiple calls to requestAnimationFrame were made with the same callback. Considering the callbacks would be returned serially, a web dev can already do this by specifying a single callback and having a loop within the callback.

Removing duplicates means slower performance and higher complexity.
You'll likely want to insert each entry into a hash table in addition
to the normal list and the check the hash table on every insert.

This isn't terribly bad, but I think we should only do so if we think
it's a problem that will actually arise enough to warrant spending the
cycles.

/ Jonas
Received on Wednesday, 1 June 2011 16:23:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 16:23:50 GMT