File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -997,6 +997,7 @@ Reader.initializeArchiveOverlay = function () {
997997 $ ( "#extract-spinner" ) . hide ( ) ;
998998
999999 // For each link in the pages array, craft a div and jam it in the overlay.
1000+ let htmlBlob = "" ;
10001001 for ( let index = 0 ; index < Reader . pages . length ; ++ index ) {
10011002 const page = index + 1 ;
10021003
@@ -1009,8 +1010,10 @@ Reader.initializeArchiveOverlay = function () {
10091010 <i id="${ index } _spinner" class="fa fa-4x fa-circle-notch fa-spin ttspinner" style="display:flex;justify-content: center; align-items: center;"></i>
10101011 </div>` ;
10111012
1012- $ ( "#archivePagesOverlay" ) . append ( thumbnail ) ;
1013+ htmlBlob += thumbnail ;
10131014 }
1015+ // NOTE: This can be slow on huge archives and on slower devices, due to the huge DOM change.
1016+ $ ( "#archivePagesOverlay" ) . append ( htmlBlob ) ;
10141017 $ ( "#archivePagesOverlay" ) . attr ( "loaded" , "true" ) ;
10151018
10161019 // Queue a single minion job for thumbnails and check on its progress regularly
You can’t perform that action at this time.
0 commit comments