I have been doing a rewrite of an app I did a few years ago that uses HTTPServer. I have noticed that file transfer upload speeds to an Android device is very slow. I recalled that I had found the upload speed a few years ago to be acceptable.
This prompted me to do some testing on four different devices. These are the results:
HTTPServer speed test. - 1,080 KB file uploaded to Android device.
1. ViewSonic ViewPad – 512 MB RAM - SDK8
24 seconds
2. Samsung Note 10.1 – 2 GB RAM - SDK16
76 seconds
3. HP Slate 7 - 1 GB RAM - SDK17
76 seconds
4. Motorola Moto G - 1 GB RAM - SDK23
25 seconds
Device number one does not have AntiVirus protection, while the three other devices are protected by Avast. I thought the AntiVirus might be slowing things down. So, I uninstalled it from the Samsung Note 10.1. This made no difference in upload speed.
I then thought it might be Google Play protect that was slowing things down. I turned it off on the Samsung Note 10.1. This again made no difference in upload speed.
I found Erel’s explanation that it was likely base64 decoding, that was slowing things down, at the link below:
https://www.b4x.com/android/forum/threads/httpserver-upload-very-slow.57143/
With the variation in upload speed with these devices, it has me wondering if it is something other than base64 decoding that is the problem. Would there be anything in HTTPServer itself that could be improved? I like the ability to make Wifi file transfers, using the client’s browser alone, with no other software in the mix on that side. If only the upload speed could be improved. I would think in this case it should be no more than a few seconds or so. Anyone have any thoughts?
This prompted me to do some testing on four different devices. These are the results:
HTTPServer speed test. - 1,080 KB file uploaded to Android device.
1. ViewSonic ViewPad – 512 MB RAM - SDK8
24 seconds
2. Samsung Note 10.1 – 2 GB RAM - SDK16
76 seconds
3. HP Slate 7 - 1 GB RAM - SDK17
76 seconds
4. Motorola Moto G - 1 GB RAM - SDK23
25 seconds
Device number one does not have AntiVirus protection, while the three other devices are protected by Avast. I thought the AntiVirus might be slowing things down. So, I uninstalled it from the Samsung Note 10.1. This made no difference in upload speed.
I then thought it might be Google Play protect that was slowing things down. I turned it off on the Samsung Note 10.1. This again made no difference in upload speed.
I found Erel’s explanation that it was likely base64 decoding, that was slowing things down, at the link below:
https://www.b4x.com/android/forum/threads/httpserver-upload-very-slow.57143/
With the variation in upload speed with these devices, it has me wondering if it is something other than base64 decoding that is the problem. Would there be anything in HTTPServer itself that could be improved? I like the ability to make Wifi file transfers, using the client’s browser alone, with no other software in the mix on that side. If only the upload speed could be improved. I would think in this case it should be no more than a few seconds or so. Anyone have any thoughts?