render 20+ styles at once

so that the page on a typical 1080p display is completely filled in initial frame at 200ms
This commit is contained in:
tophf 2017-12-24 10:03:13 +03:00
parent 41dd9b9c47
commit 72ce4a15d6

View File

@ -135,7 +135,7 @@ function showStyles(styles = []) {
while (
index < sorted.length &&
// eslint-disable-next-line no-unmodified-loop-condition
(shouldRenderAll || ++rendered < 10 || performance.now() - t0 < 10)
(shouldRenderAll || ++rendered < 20 || performance.now() - t0 < 10)
) {
renderBin.appendChild(createStyleElement(sorted[index++]));
}