[TIMOB-27867] FileStream.read() with a callback is not asynchronous on iOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Ryan Aston |
Assignee | Abir Mukherjee |
Created | 2020-04-09T19:27:18.000+0000 |
Updated | 2020-06-02T13:47:43.000+0000 |
Description
FileStream.read() is supposed to be an asynchronous call if invoked with a callback argument. While this works in Android, in iOS it appears to be called synchronously. This is causing our application to feel slow and even hit memory and recursion limits with large files. Attached is a sample app that demonstrates the behavior.
Android 8.1.0 console output
[ERROR] starting file read
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 1
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 2
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 3
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 4
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 5
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 6
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 7
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 8
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 9
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[WARN] ++++ 1. After Read
[WARN] ---- 2. Reader Callback
[ERROR] 10
[ERROR] Done!
iOS 12.4 console output
[ERROR] starting file read
[WARN] ---- 2. Reader Callback
[ERROR] 1
[WARN] ---- 2. Reader Callback
[ERROR] 2
[WARN] ---- 2. Reader Callback
[ERROR] 3
[WARN] ---- 2. Reader Callback
[ERROR] 4
[WARN] ---- 2. Reader Callback
[ERROR] 5
[WARN] ---- 2. Reader Callback
[ERROR] 6
[WARN] ---- 2. Reader Callback
[ERROR] 7
[WARN] ---- 2. Reader Callback
[ERROR] 8
[WARN] ---- 2. Reader Callback
[ERROR] 9
[WARN] ---- 2. Reader Callback
[WARN] ---- 2. Reader Callback
[ERROR] 10
[ERROR] Done!
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
[WARN] ++++ 1. After Read
Attachments
File | Date | Size |
---|---|---|
FileStreamAsyncBug.zip | 2020-04-09T19:25:36.000+0000 | 8663231 |
[~ryan@mvretail.com] Was it working in any previous sdk in iOS ?
I am not sure. We did not use this API prior to 8.0.0.
Any updates on this?