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:
		
							parent
							
								
									53eac84312
								
							
						
					
					
						commit
						12fe1b619f
					
				|  | @ -134,7 +134,7 @@ function showStyles(styles = []) { | ||||||
|     while ( |     while ( | ||||||
|       index < sorted.length && |       index < sorted.length && | ||||||
|       // eslint-disable-next-line no-unmodified-loop-condition
 |       // 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++])); |       renderBin.appendChild(createStyleElement(sorted[index++])); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user