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

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 UTC