PolymerElements / iron-fit-behavior

Fits an element into another element
17 stars 34 forks source link

Lazily calculate and memoize __isRTL property in iron-fit-behavior. #101

Closed krozycki closed 4 years ago

krozycki commented 4 years ago

Calling window.getComputedStyles(this) is expensive (~80ms) and is done in attached() now, which impact page load time (rendering).

Instead we could calculate it when it is accessed for the first time.