Best method for creating a fast HTTP server
Posted: Thu Apr 09, 2015 10:01 pm
Hey!
I just received my first ESP8266 module and I am looking for some guidance and suggestions on the best way to make a fast webserver out this ESP8266 which is able to serve up HTML pages of 5000 > 6000 characters as quickly as possible.
I know of at least 3 conceptual methods to do this
- Write a webserver application and flash it to the ESP8266 using its DEV tools
- Write the webserver on an Arduino board and send all commands to the ESp8266 via Serial
- Write the webserver application in the new Arduino ESP8266 IDE release
I made a working webserver last night using the new Arduino IDE EPS8266 edition (since I am already quite familiar with writing arduino network application) however using the "client.print()" function to send my stylesheet and webpage to my browser takes around 10 seconds!
I could probably reduce this time by reducing the amount of client.print() calls (I use quite a few in order to keep the HTML code somewhat readable...)..which I will be testing tonight. Does anyone know the optimal amount of characters to include in each client.print() call with the wifi library? Is there a faster way to send data to the connected client?
But am I running up hill here? Will this method of programming the ESP8266 ever be able to provide a FAST web browsing experience with HTML pages of up to 6000 characters?
Note that no images are required on the webpages.
Any thoughts and suggestions would be fantastic !
I just received my first ESP8266 module and I am looking for some guidance and suggestions on the best way to make a fast webserver out this ESP8266 which is able to serve up HTML pages of 5000 > 6000 characters as quickly as possible.
I know of at least 3 conceptual methods to do this
- Write a webserver application and flash it to the ESP8266 using its DEV tools
- Write the webserver on an Arduino board and send all commands to the ESp8266 via Serial
- Write the webserver application in the new Arduino ESP8266 IDE release
I made a working webserver last night using the new Arduino IDE EPS8266 edition (since I am already quite familiar with writing arduino network application) however using the "client.print()" function to send my stylesheet and webpage to my browser takes around 10 seconds!
I could probably reduce this time by reducing the amount of client.print() calls (I use quite a few in order to keep the HTML code somewhat readable...)..which I will be testing tonight. Does anyone know the optimal amount of characters to include in each client.print() call with the wifi library? Is there a faster way to send data to the connected client?
But am I running up hill here? Will this method of programming the ESP8266 ever be able to provide a FAST web browsing experience with HTML pages of up to 6000 characters?
Note that no images are required on the webpages.
Any thoughts and suggestions would be fantastic !