ClosedPlayer icon indicating copy to clipboard operation
ClosedPlayer copied to clipboard

Slow upload speed

Open vasanthpradeep opened this issue 1 year ago • 3 comments

Hello sir @tfry-git I have tried to implement your project. It's a really nice work which you have done. But the upload speed for the audio files is too low. Is there any way to increase the upload speed. Atleast a decent speed so that I can upload some 20MB files much faster.

Regards Vasanth P

vasanthpradeep avatar Jun 10 '24 09:06 vasanthpradeep

I am not currently actively working on this project, but glad to see it used. IIRC, the uploads speeds I saw were somewhere in the vicinity of 100KB/s. Definitely not great, but worked for me. You are aware that you can upload a whole directory at once? At least for me that's what made things bearable, because you can just let it unattended while waiting for the upload to complete.

If you would like to investigate yourself, the ~30 lines of code starting here: https://github.com/tfry-git/ClosedPlayer/blob/573f4ce1a55a237ddbf7c67bf2ca3346d39c1c61/WebInterface.h#L162 are where the upload is being handled. It do not immediately see any options for improving the speed, however.

tfry-git avatar Jun 10 '24 14:06 tfry-git

I am not currently actively working on this project, but glad to see it used. IIRC, the uploads speeds I saw were somewhere in the vicinity of 100KB/s. Definitely not great, but worked for me. You are aware that you can upload a whole directory at once? At least for me that's what made things bearable, because you can just let it unattended while waiting for the upload to complete.

If you would like to investigate yourself, the ~30 lines of code starting here:

https://github.com/tfry-git/ClosedPlayer/blob/573f4ce1a55a237ddbf7c67bf2ca3346d39c1c61/WebInterface.h#L162

are where the upload is being handled. It do not immediately see any options for improving the speed, however.

Thank you for your reply. I will update here if i could improve the code

vasanthpradeep avatar Jun 10 '24 16:06 vasanthpradeep

Some additional thoughts:

  1. Slowness could originate from the reception of data over wifi, or from writing it to SD card (or of course, a combination of both). For an idea, which it is, it might be interesting to simply omit actually writing to the SD card, to see if (how much) that speeds up thing.
  2. If something can be done at all, I would guess it might be to keep (larger) buffers. Not sure, how that could be done inside the networking, but if the writing to SD card is the issue, you could add a RAM buffer that only gets written to SD every once in a while.

tfry-git avatar Jun 10 '24 20:06 tfry-git