-->
Page 1 of 7

My WIFI Transfer Speed Improvement - 160 Times

PostPosted: Wed Aug 19, 2015 11:44 am
by eldonb46
I use, and like, the Arduino IDE for ESP8266 software development and have used the "example code" for my initial efforts, but now, my interest expand beyond trivial examples.

20150508_171952.jpg

Above is My Experimental Web Server Farm ;) (a little under powered, but it works)

Like many of the published ESP examples, I used a form of "server.send()" to transfer data via WIFI, but then I found "that" function is somewhat limited (or at least the way I understand it) and therefore I explored the available documentation and source code for other capabilities.

I found "server.sendContent()" which appeared more flexible and more to my desires for a transfer function. I have used "it" for several months for building my apps. My typical transfers are about 5K to 15K bytes, but can be as large as 100K bytes.

My dynamically created WEB Pages typically take about "6.5 seconds" to transfer to a browser, for a small device like the ESP's, I thought that was a little slow, but still usable.

Actually, for my application, I started considering abandoning the ESP's, due to lack of WIFI transfer speed.

BUT THEN, in some obscure recesses of some online web page, I found the "server.client().print()" function - A BIG SPEED IMPROVEMENT. Now the same dynamic WEB Page transfers in only "0.043 seconds" !!!!

For my application, that is a BIG speed improvement of 160 times faster. From my perspective, the little ESP is now a WIFI "screamer" !!

I really like it, when something WORKS !!

This note is published here in hope that someone else finds this information useful. If previously known, it would have save me a lot of time and anguish.

I only wished I understood or knew this earlier, but then I am still learning the ESP (there is much to know). I am sure there are other ESP improvements or coding strategies that I have yet to discover. I plan to publish my "example" application code for others to review, use, and/or abuse.

Follow my ESP adventures (and more) on my blog at: http://WA0UWH.blogspot.com

For your review, my experimental ESP Web Server is (sometimes) running at: http://dc02.ebcon.com:8160

Eldon - WA0UWH

Re: My WIFI Transfer Speed Improvement - 160 Times

PostPosted: Wed Aug 19, 2015 11:50 am
by danbicks
This sounds Awesome,

Have you some example code of this function incorporated to look at and test what I need to amend in some of my Wifi Web server sketch's :)

Dans

Re: My WIFI Transfer Speed Improvement - 160 Times

PostPosted: Wed Aug 19, 2015 12:22 pm
by martinayotte
That is a bit strange, since both send() and sendContent() are in fact using _currentClient.write() internally, which should be equivalent to server.client().print().
Which version of ArduinoIDE are you using ?
When I get chances, I will dig the issue if IGRR doesn't have time either.

Re: My WIFI Transfer Speed Improvement - 160 Times

PostPosted: Wed Aug 19, 2015 10:39 pm
by ridge
eldonb46 gets the award for the first public access esp8266 web server I have seen!

It is a screamer indeed! The load times are perfectly acceptable for a USD$2.34 web server. Well done!