Uploading 69 video files ranging from 12 MB to 170 MB (using an asyncqueue with concurrency limit of 5) will cause to increase the memory usage on iOS Simulator easily to 4 GB without releasing memory after a successful upload. Unmounting the uploading logic in JS will also not release memory.
I have received various crash reports from Firebase Crashlytics about iPhones experiencing crashes due to this.
Expected behavior
After an upload is done the memory should be released from that task.
Platform
[ ] Android
[X] iOS
With an Simulator running iOS 16.4 I'm able to reproduce this 100% of the time.
Simulator running iOS 17.4 does not report this issue with the Performance Monitor
On real devices it appears to happen on iOS 18 as well. And don't recall with certainty, but also iOS 17 on real devices.
React Native Version
0.73.2
React Native Compressor Version
1.8.24
Reproducible Steps And Demo
Have a large set of video files (any multitude of the concurrency limit)
Optional: Write async queue logic with concurrency limit of 5
Current behavior
Uploading 69 video files ranging from 12 MB to 170 MB (using an asyncqueue with concurrency limit of 5) will cause to increase the memory usage on iOS Simulator easily to 4 GB without releasing memory after a successful upload. Unmounting the uploading logic in JS will also not release memory.
I have received various crash reports from Firebase Crashlytics about iPhones experiencing crashes due to this.
Expected behavior
After an upload is done the memory should be released from that task.
Platform
With an Simulator running iOS 16.4 I'm able to reproduce this 100% of the time. Simulator running iOS 17.4 does not report this issue with the Performance Monitor On real devices it appears to happen on iOS 18 as well. And don't recall with certainty, but also iOS 17 on real devices.
React Native Version
0.73.2
React Native Compressor Version
1.8.24
Reproducible Steps And Demo
Video demo
https://mega.nz/file/J4kDTJbT#Tf_zWMLtmg98Ax921nRlCkxh2YnouabflKnk0G-PgUE