GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
918 stars 337 forks source link

Poor performance with sending images and files > 10Mb #1950

Closed RoliqueStanisGonyk closed 2 weeks ago

RoliqueStanisGonyk commented 3 months ago

Which packages are you using?

stream_chat_flutter, stream_chat_flutter_core

On what platforms did you experience the issue?

iOS, Android

What version are you using?

stream_chat_flutter: 7.1.0 stream_chat_flutter_core: 7.1.0

What happened?

Recently, I upgraded my chat plan from the free tier to the Start plan in hopes of improving the performance, particularly the uploading speed of media files. However, despite this upgrade, I've noticed that the upload speeds for images and videos remain sluggish.

We've conducted tests from different locations, including the USA, Ukraine, and Thailand and we found that image uploads from Ukraine are fast enough, while in other countries, particularly in the USA and Thailand, the upload speeds are unacceptably slow. It`s especially bad in case if file have size more than 10Mb, to the point that file is not uploaded at all no matter how long we wait. Here some examples:

  1. RPReplay_Final1713973991 - 3 videos each from 30MB up to 36MB. As you can see, the message has been sent but the video takes a very long time to load and as a result is not uploaded.
  2. RPReplay_Final1713974659 - 1 video, 30MB the same behavior.

Other examples without video:

USA: Upload speed: 49.6 Mbps Download speed: 45 Mbps

1 Image (1.6 MB) = 5 secs 2 Images (1.6 MB + 1.2 MB = 2.8 MB) = 8 secs 3 Images (1.6 MB + 1.2 MB + 1.8 MB = 4.6 MB) = 8 secs 1 Video (163.2 MB) = 43 secs

Thailand: Upload speed: 89.3 Mbps Download speed: 41.8 Mbps Photos and videos take over 10 seconds to upload. Videos take more than 5 minutes. Ukraine: Upload speed: 83.6 Mbps Download speed: 93.3 Mbps Three photos, each around 6.6-6.8 MB, take approximately 5 seconds to upload. Three videos simultaneously, each between 30-36 MB, took too long to upload and ultimately failed. I closed the app without them uploading. One video, 30.2 MB, took approximately 1 minute and 20 seconds to upload. One photo, 6.8 MB, took up to 5 seconds to upload.

GetStream Support unfortunately had not managed to resolve our issue so far.

Steps to reproduce

1. We try to upload file/images via sending them in attachments in SendMessage function.
2. ???
3. Profit

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

deven98 commented 3 months ago

Hey @RoliqueStanisGonyk, I'm running some benchmarks on this, I will keep you updated.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 20 days with no activity.

RoliqueStanisGonyk commented 2 months ago

@deven98 Hi guys. Do you have any updates about our issue or benchmarks?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 20 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 20 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 7 days since being marked as stale.