Skip to content

[Performance] Reduce calls to getBoundingClientRect()  #5

@devrelm

Description

@devrelm

In some browsers, getBoundingClientRect() forces a new layout calculation on each call.

Currently, the resize-observer module calls getBoundingClientRect() multiple times during each animation frame, especially when the size has changed. We should instead cache this value the first time that it is called per animation frame and reuse that value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions