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
I'm currently making a file server, and the FileHandle.read() function blocks the UI's thread. Here's what the uploadChunk() function looks like in zustand:
Are there any clever workarounds for the UI blocking await read() function? Or is it a logic thing where I should change the code to no longer need to await file.read()? Currently the DEFAULT_CHUNK_SIZE is set to 4MB and it seems almost smooth, but it leads to a bunch of network calls for larger files and through testing, setting it to larger chunk sizes increases performance by quite a bit, although introduces freezing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently making a file server, and the FileHandle.read() function blocks the UI's thread. Here's what the uploadChunk() function looks like in zustand:
Code
Question
Are there any clever workarounds for the UI blocking
await read()
function? Or is it a logic thing where I should change the code to no longer need toawait
file.read()? Currently theDEFAULT_CHUNK_SIZE
is set to 4MB and it seems almost smooth, but it leads to a bunch of network calls for larger files and through testing, setting it to larger chunk sizes increases performance by quite a bit, although introduces freezing.Beta Was this translation helpful? Give feedback.
All reactions