mozilla / send

Simple, private file sharing from the makers of Firefox
https://send.firefox.com
Mozilla Public License 2.0
13.25k stars 1.55k forks source link

[Android] Uploading a file takes 10 times as long as the website #1139

Open Softvision-AndreeaCupsa opened 5 years ago

Softvision-AndreeaCupsa commented 5 years ago

[Notes]:

[Affected Platforms]:

[Prerequisites]:

[Steps to reproduce]:

  1. Open the Send Android application and add a 100MB file.
  2. Open the browser, navigate to https://send2.dev.lcip.org/ and add a 50MB file.
  3. Start uploading both files at the same time.
  4. Observe the mobile app’s behavior as the website upload has finished.

[Expected result]:

[Actual result]:

[Notes]:

rec of issue - upload

dannycoates commented 5 years ago

@fzzzy the base64 encoding only applies to intent triggered files, right? So if it's also slow for files added from the 'add files' button then the slowness is all within the webview.

fzzzy commented 5 years ago

@dannycoates good point! my main guess at the moment is that the cryptofill is being used because the webview doesn't have some api, or because the user agent is set to "send android"

dannycoates commented 5 years ago

android can't be loading the crypto polyfill because it never calls getCapabilities()

SoftVision-CosminMuntean commented 5 years ago

I have retested this issue using the latest Android Send version (org.mozilla.sendandroid-2019-03-01-release-signed.apk) compared with the Send v2 website by uploading a 100 Mb file. Unfortunately I haven't observed any noticeable improvements. Here are the results:

fzzzy commented 5 years ago

@SoftVision-CosminMuntean Are you testing uploading with the Chrome browser on the same android device you are testing the app on? Because I am not seeing any of that behavior on my S8.

SoftVision-CosminMuntean commented 5 years ago

@fzzzy I have tested with Firefox 65.0.1 browser on the same Android device where the app is installed.

However, I just verified on Chrome browser on the same Android device and it seems that 100Mb file takes ~3m10s to be uploaded and on Firefox browser only ~20s.

fzzzy commented 5 years ago

@SoftVision-CosminMuntean Ok, great, that is very good news. That means switching to GeckoView will most likely fix this. However, there are no engineers on the project at the moment, as I am starting on rust-components today. If Send becomes a priority again and engineers are assigned to the project, there is a clear path to speeding it up.