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
At the moment this part synchronously reads every asset file from disk to memory, potentially blocking the process for a long time. I think we should consider preparing for a few optimizations (some of these we've already been doing in expo publish):
#167
Closed
jkhales opened this issue
Dec 16, 2020
· 0 comments
At the moment this part synchronously reads every asset file from disk to memory, potentially blocking the process for a long time. I think we should consider preparing for a few optimizations (some of these we've already been doing in expo publish):
Parallelize hash calculation
Parallelize uploading
Pipe the file read stream to upload request (i.e. uploadWithPresignedPostAsync(fs.createReadStream(filename)), ...)
Possibly show a progress bar while reading/hashing/uploading files in the future
Perhaps we should already make RawAsset have a filename field instead of buffer. This way we don't keep every asset of the app (which could easily be hundreds of megabytes) in memory for the duration of the command, but instead they're only read as needed and can be garbage collected as soon as that particular asset is done.
At the moment this part synchronously reads every asset file from disk to memory, potentially blocking the process for a long time. I think we should consider preparing for a few optimizations (some of these we've already been doing in
expo publish
):uploadWithPresignedPostAsync(fs.createReadStream(filename))
, ...)Perhaps we should already make
RawAsset
have afilename
field instead ofbuffer
. This way we don't keep every asset of the app (which could easily be hundreds of megabytes) in memory for the duration of the command, but instead they're only read as needed and can be garbage collected as soon as that particular asset is done.Originally posted by @fson in #147 (comment)
The text was updated successfully, but these errors were encountered: