Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

process.nextTick polyfill is slow when tab is unfocused #92

Description

@satazor

The nextTick polyfill is supplied by https://github.com/defunctzombie/node-process/blob/master/browser.js which uses timers. See: defunctzombie/node-process#86.

Because timers are often throttled when a tab is not active to improve battery life, they only run at 1Hz (once every second). This has a drastic performance impact in those scenarios.

It seems that the author won't change this for the time being, see: webtorrent/webtorrent#1568 (comment)

It would be cool to just map nextTick to setImmediate, as we are already providing that polyfill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions