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

Perf degradation due to calls to window.getComputedStyle in attached #68

@benoitjchevalier

Description

@benoitjchevalier

In attached we remember if the element is RTL or not:
this._isRTL = window.getComputedStyle(this).direction == 'rtl';

Even though this is designed as too avoid having to make recurrent call to getComputedStyle attached can be called again when moving the element around in the dom, performing an unneeded calculation/layout.

In our case the performance hit actually shows when moving an item around having 40 subitems which all get "attached".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions