Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6083] iOS Uploading files causes extremely high ram usage

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2019-01-17T22:06:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterDonovan Lewis
AssigneeShak Hossain
Created2018-12-28T22:33:13.000+0000
Updated2019-01-17T22:06:21.000+0000

Description

When uploading a large file or multiple small files at the same time the ram usage on iOS will sky rocket and is not always garbage collected after the upload is finished or stopped. A upload of 100 MB can cause well over 400 MB of ram usage. Repeated uploads will cause the app to crash because it will not be garbage collected always. Multiple small uploads will cause the same issue to happen. On older devices this is a bigger problem because of only having 1 or 2 GB of ram. But with larger file sizes even on newer devices this is a high amount of ram usage for an app. Having jscore set to false in the tiapp.xml seems to make it work better but its still not perfect. When you start an upload the file is immediately put into ram instead of being read off the disk, when the file is in ram it uses much more ram than the size of the file itself. I do not think the file should be put into ram if that was not done we would avoid this issue altogether.

Comments

  1. Sharif AbuDarda 2018-12-30

    Hello, Please share a standalone sample code that can be used to reproduce the issue and observe the behavior. Thanks.
  2. Rakhi Mitro 2019-01-16

    Hello, Just passing as follow up here. Are you able to get that sorted out?  Please let us know if you need more help with this issue.

JSON Source