Skip to content

Replace excessive usage of getBoundingClientRect #12109

@eszkadev

Description

@eszkadev

cc: @Cwiiis

Describe the Bug

getBoundingClientRect is a costly function, we should review it's usage so it doesn't trigger unwanted style-calculation or layouting in the browser. All usages possibly should happen inside LayoutingService task or Canvas drawing callback 0 to be scheduled in the animation frame where we have all elements in place.

This is optimization task, best to do a profiling before and after the change and upload image in the PR.

Examples where to look:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions