Skip to content

high cpu usage #229

Open
Open
@aparmar

Description

@aparmar

On my machine, there is high cpu usage on pages that use holder. Traced it back to these lines in index:

    // Done to prevent 100% CPU usage via aggressive calling of requestAnimationFrame
    setTimeout(function () {
        global.requestAnimationFrame(visibilityCheck);
    }, 10);

Since this is a recursive call, can we only make these calls on DOM changes? Or pehaps a way for the developer to turn off the timeout, and manually call Holder when a change has occurred.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions