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 wrote simple app to test upload with dropbox-core-sdk 2.1.2.
It opens stream from a file located at Dropbox InputStream fileContentStream = getClient().files().download(path).getInputStream();
and passes it to upload method (within same account, but should be same even for different accounts):
The problem is memory consumption rapidly increases from 5MB to 192MB within 10 s., then app crashes:
I/art: Clamp target GC heap from 207MB to 192MB
I/art: HomogeneousSpaceCompact marksweep + semispace GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 191MB/192MB, paused 624.881ms total 624.881ms
W/art: Throwing OutOfMemoryError "Failed to allocate a 12 byte allocation with 3680 free bytes and 3KB until OOM
File size is 550MB. Allocation trace showing DbxUploadStyleBuilder.uploadAndFinish():92 is the main contributor; it breaks down to com.android.okhttp.okio.SegmentPool.take():46 which is allocating numerous byte[] chunks 12288 each until crash.
Question: am I using the dropbox SDK not properly for uploading of large files or it's an issue in SDK?
The text was updated successfully, but these errors were encountered:
Hi @rsharifu , there is no guarantee that uploadAndFinish won't load the whole file into memory. To upload a large file on mobile devices we strongly suggest you to split the file into chunks then upload with start/append/finish method.
I wrote simple app to test upload with dropbox-core-sdk 2.1.2.
It opens stream from a file located at Dropbox
InputStream fileContentStream = getClient().files().download(path).getInputStream();and passes it to upload method (within same account, but should be same even for different accounts):
The problem is memory consumption rapidly increases from 5MB to 192MB within 10 s., then app crashes:
File size is 550MB. Allocation trace showing DbxUploadStyleBuilder.uploadAndFinish():92 is the main contributor; it breaks down to com.android.okhttp.okio.SegmentPool.take():46 which is allocating numerous byte[] chunks 12288 each until crash.
Question: am I using the dropbox SDK not properly for uploading of large files or it's an issue in SDK?
The text was updated successfully, but these errors were encountered: