Wednesday, August 19, 2015

My WIFI Transfer Improvement - 160 Times

UPDATE: Aug 25, 2015

I was using an older revision of the Arduino IDE (old 1.6.4) and an old set of Exp Extensions.

With current IDE 1.6.5 and current Esp Ext's the "server.send()", "server.sendContent()", and "server.client().print()" functions all have about the same performance - fast.

The moral of the story, make sure your environment is up-to-date.



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.

My Experimental Web Server Farm
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.

For your review, my experimental ESP Web Server is (sometimes) running at:



-- Home Page: https://WA0UWH.blogspot.com

1 comment:

  1. GREAT STUFF Eldron! ESP Webserver also very impressive!

    Is there any chance to get some sample code, pls?

    Best regards
    Vleis Walker

    ReplyDelete