You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSZip is significantly slow in NextJS by more than 50 times compared to other platform like Gatsby.
The reason is that there's no polyfill for setImmediate in NextJS therefore it falls back to set-immediate-shim which is a very slow library.
There already has been many pull requests/issues addressing the same problem.
It would probably be better to delegate operations to a separate thread instead of using setImmediate to let it run in the event loop. Even if JSZip doesn't freeze the browser, it still causes sluggish operation because it's crunching numbers on the main thread. Worker threads are the approach used by fflate, which is multiple times faster.
JSZip is significantly slow in NextJS by more than 50 times compared to other platform like Gatsby.
The reason is that there's no polyfill for setImmediate in NextJS therefore it falls back to set-immediate-shim which is a very slow library.
There already has been many pull requests/issues addressing the same problem.
#702
#716
#619
vercel/next.js#22372 (comment)
I think this long overdue issue has to be resolved once and for all.
The text was updated successfully, but these errors were encountered: