Skip to content

[Performance] Reduce calls to getBoundingClientRect()  #5

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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