Been messing with FTP to allow download of the current app and updating. Using Firefox with the Download Statusbar Extension, I noticed that the download speed from the Netburner was pretty punky, about 53KBytes per second average for a large app (3.36MB S3 file size). So looking over the code in StreamUpdate.cpp, at the bottom of the loop is WriteS3, which was using siprintf and strlen to add each byte to the output buffer.
I present here a modest change which results in more than a factor of 5 speed up, to 330KBytes per second.
Hi,
This does look like it should be much more efficient. If you do not mind we will update the StreamUpdate code for future builds with your code. I did tests on the FTPD_AppUpdate using Firezilla as my client. I downloaded the application at about 50KB/s with the original code. Then when I switched to your new code I am in the 500-600KB/s range with a max of about 750KB/s, I had to make an HTML folder with some binary files to increase the application size so I could actually see the speed.
-Larry
Larry: While you're at it, I find the ftp calls work much more efficiently, particularly with large directories if the function in ftp_f.cpp called gettimedate() is edited to remove iprintf statements. This file has some other iprintfs that could stand commenting depending on the level of debug req'd. These comments go out stdio so it can be a bit surprising if you're using the port for something else. It might be nice to have a compile directive to allow them to be turned on/off? I tensd to like the ones showing a problem, but comment the others.