Closed DE-cr closed 1 year ago
I'd appreciate others testing this change on systems I don't have available, most notably Arduino instead of ESP32, wired network connection instead of wifi, and using an SD card.
Not doing this on Arduino now, because of https://github.com/fredlcore/BSB-LAN/pull/542#issuecomment-1474269236
... if available from the heap, otherwise falling back to the existing static (<=) 1 KB buffer reason: performance improvement (>20% on an esp32 w/o SD card, using wifi)
An equivalent algorithm is already part of my https://github.com/fredlcore/BSB-LAN/pull/542, but only for /Dyyyy-mm-dd,YYYY-MM-DD, as /D and /Dn in that PR use transmitFile() directly (and therefore would also benefit from this PR here!).
The change has been done based on measuring /D times [s] on a datalog.txt of about 970 KB on my system (see above), comparing implementations using the original 1 KB buffer size and the new 4 KB buffer size for the transfer (file reading and data transmission over http):
I've created a new PR here, and have not included this in https://github.com/fredlcore/BSB-LAN/pull/542, to allow inclusion of this PR here, even if the other one is not accepted.