Chat freely about anything...

User avatar
By htwtsang
#74952 I've been having a problem which I've put off for quite a while now and it's whenever on first load for my main webpage it is really slow. It takes about 5 seconds up to a minute and occasionally it doesn't even load. From what I can see from the serial terminal it's pauses when it loading the javascript after a while the pool slot is finished. I think my webpage file is too large but it's only around 30kb all together which doesn't seem that big. I also have another smaller webpage that does not have this problem.
I've tried using different compression to try to reduce the code size but it doesn't seem to work out.

Is this really a size problem or is something else going on?

Error (timeout?):
Code: Select all URL = /main/main_webpage.html
Is url index 0
Is url index 25
Heatshrink compressed file; decode parms = b4
Conn req from  192.168.0.180:22014, using pool slot 0
Conn req from  192.168.0.180:22270, using pool slot 1
URL = /main/main_webpage.css
Is url index 0
Is url index 25
Heatshrink compressed file; decode parms = b4
Conn req from  192.168.0.180:22526, using pool slot 3
URL = /140medley.min.js
Is url index 0
Is url index 25
Heatshrink compressed file; decode parms = b4
URL = /main/main_webpage.js
Is url index 0
Is url index 25
Heatshrink compressed file; decode parms = b4
Pool slot 1 is done. Cleaning up for next req
Pool slot 2 is done. Cleaning up for next req
Pool slot 0 is done. Cleaning up for next req
rconn[1].fd network socket has been closed? 0
Pool slot 1: socket closed.
rconn[0].fd network socket has been closed? 0
Pool slot 0: socket closed.
rconn[2].fd network socket has been closed? 0
Pool slot 2: socket closed.
User avatar
By PatrykW
#74970 I've been running into similar issues when using ESPAsyncWebServer. Solved it by merging all JS code into one file.
My guess is that the ESP has hard time handling multiple requests at the same time.
User avatar
By htwtsang
#74998
PatrykW wrote:I've been running into similar issues when using ESPAsyncWebServer. Solved it by merging all JS code into one file.
My guess is that the ESP has hard time handling multiple requests at the same time.


I merged everything including the css into 1 html file, it seems slightly more stable but the load time is about the same, 5-10s.

Is 30 kb reallly that big of a file for the module?
User avatar
By PatrykW
#75001 The size doesn't seem to be an issue in my case. I'm serving jQuery with a bunch of plugins (all merged into one file and gzipped, which is over 65k in total), I have it linked in several HTML documents and the load time is under a second every time.
But like I've said, I am using ESPAsyncWebServer, so there's that.