holymoly Member Licensed User Longtime User Aug 11, 2015 #1 Hi there, I've got a problem with the httpserver-library - the upload is very slow. As reference I used an unchanged version of the HttpServerExample from here. I navigated to the Download-Folder and used the upload form: One file with 484KB took 1min45, a second file with 142KB took 31sec (then it hit the Server_HandleRequest sub...)... this is an average of 4,6 Kilobyte per second. This is way too slow... I wanted to ask if somebody could double-check my results, bug or feature? I used different browsers, different Wifis (with B4ABridge), different android devices. - HttpServer Version 1.00 - IDE Version 5.02 (1) Any help would be greatly appreciated! Thx!
Hi there, I've got a problem with the httpserver-library - the upload is very slow. As reference I used an unchanged version of the HttpServerExample from here. I navigated to the Download-Folder and used the upload form: One file with 484KB took 1min45, a second file with 142KB took 31sec (then it hit the Server_HandleRequest sub...)... this is an average of 4,6 Kilobyte per second. This is way too slow... I wanted to ask if somebody could double-check my results, bug or feature? I used different browsers, different Wifis (with B4ABridge), different android devices. - HttpServer Version 1.00 - IDE Version 5.02 (1) Any help would be greatly appreciated! Thx!
Erel B4X founder Staff member Licensed User Longtime User Aug 12, 2015 #2 HttpServer upload is not efficient as it uses the standard multipart protocol. This means that it needs to base 64 decode the data. It shouldn't be difficult to use AsyncStreams to transfer the files directly. Upvote 0
HttpServer upload is not efficient as it uses the standard multipart protocol. This means that it needs to base 64 decode the data. It shouldn't be difficult to use AsyncStreams to transfer the files directly.
holymoly Member Licensed User Longtime User Aug 13, 2015 #3 As far as I understand AsyncStreams only works when both sides listen/receive for this kind of streams. I want to upload a file from any kind of browser (without extra software) to an android device ... just a basic webserver functionality. Is there another option to send a file this way? Upvote 0
As far as I understand AsyncStreams only works when both sides listen/receive for this kind of streams. I want to upload a file from any kind of browser (without extra software) to an android device ... just a basic webserver functionality. Is there another option to send a file this way?
DonManfred Expert Licensed User Longtime User Aug 13, 2015 #4 Install a ftp server for example... ftp do not need to use base64 encoded files. Upvote 0
holymoly Member Licensed User Longtime User Aug 14, 2015 #5 DonManfred said: Install a ftp server for example... ftp do not need to use base64 encoded files. Click to expand... As I said above I want to upload a file from any kind of browser without extra installed software on the client side. I'm not sure if there is a possible solution for a javascript (?) ftp client... Besides: base64 adds an filesize overhead +~33%; The encoding happens on the client side. So the decoding on the server side seems to be the slow part... ... in my opinion the upload integration in the jetty servlet could and should be optimized... I don't think the bottleneck is the hardware ... Upvote 0
DonManfred said: Install a ftp server for example... ftp do not need to use base64 encoded files. Click to expand... As I said above I want to upload a file from any kind of browser without extra installed software on the client side. I'm not sure if there is a possible solution for a javascript (?) ftp client... Besides: base64 adds an filesize overhead +~33%; The encoding happens on the client side. So the decoding on the server side seems to be the slow part... ... in my opinion the upload integration in the jetty servlet could and should be optimized... I don't think the bottleneck is the hardware ...