Cloudkibo / iOS

iOS Code
0 stars 0 forks source link

Downloading file in 1-1 chat is slow #409

Closed sumairasaeed closed 7 years ago

sumairasaeed commented 7 years ago

This is to investigate resolve the speed issue when downloading file in 1-1 chat.

jekram commented 7 years ago

Why is this not part of the task download file? We need to do all investigate as part of the task.

jekram commented 7 years ago

@sumairasaeed This should be part of the download logic. We do not design bad logic and then open new task to correct it. Close this and reopen the download task to fix this issue.

sumairasaeed commented 7 years ago

Reopened download task https://github.com/Cloudkibo/iOS/issues/293 . We can close this one please.

sumairasaeed commented 7 years ago

I have worked on speed issue of file download. I investigated and found that our networking library Alamofire allows 2 types of file download. (1) in memory-download using request data API and (2) on-disk using download API. Alamofire library recommends to use on-disk-download for larger files and for video streaming.

We were previously using on-disk download API for all files so it was slow. Now, I have changed it to use in-memory download for files less than a threshhold size. Currently i have set threshhold size as 10MB.

I have noticed that download speed has significantly increased after this change. Some work is remaining on this task to perform this download in background.

jekram commented 7 years ago

Why are we reporting on task that I have asked to be closed.

sumairasaeed commented 7 years ago

Mistakenly commented here.

On Thu, Nov 24, 2016 at 8:22 AM, Cloudkibo notifications@github.com wrote:

Closed #409 https://github.com/Cloudkibo/iOS/issues/409.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Cloudkibo/iOS/issues/409#event-870568765, or mute the thread https://github.com/notifications/unsubscribe-auth/AKbhp6mKc0bYe2lUVJhzGCvouoGVz_hPks5rBQLegaJpZM4K3tHd .

jekram commented 7 years ago

The more important learning is that we need to investigate first then write code.