akiran / akiran/react-slick

Forced reflow - Performance bottleneck

Offen
#1,274 20 Kommentare 22 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
11.9k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello akiran,

The slider has been an amazing addition for many projects of ours. Thank you.

We were trying to optimize all our apps using several metrics.

A case in which the slider seems to trigger expensive forced reflow of our layouts which is impacting the performance on a huge scale.

We wanted to know if it is such that this issue can be fixed or our implementation of it is not the optimal in a way.

- helpers.js
`getWidth: function getWidth(elem) {
return elem && (elem.getBoundingClientRect().width || elem.offsetWidth) || 0;
},`

Can this be optimized?

![screen shot 2018-06-15 at 11 31 54 am 2](https://user-images.githubusercontent.com/19756463/41452836-237e4f5a-7091-11e8-9c47-665c10a88946.png)

![screen shot 2018-06-15 at 11 46 37 am 2](https://user-images.githubusercontent.com/19756463/41453012-d06f1f8c-7091-11e8-9292-002b617eb29e.png)

Thank you for your time.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.