jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
640 stars 115 forks source link

response too slow #42

Closed Singein closed 5 years ago

Singein commented 5 years ago

thanks for sharing this amazing project! the average of http-responsing time is too slow, about 3 seconds. Is there a way to optimize?

jczic commented 5 years ago

What's your platform and how memory SDRAM have you ?

Singein commented 5 years ago

esp32 , about 128k RAM

jczic commented 5 years ago

There are many memory allocation in the web server, 128k is can be just if you have microwebsrv (websockets? pyhtml?) + another code around.

Do you use the threaded mode or the blocking mode? 3 seconds, it's slow yes...

You can also adjust threads stack size of your micro-controller.

However, this is not due to the DNS resolving?

Singein commented 5 years ago

hi,buddy, I just bought a new esp32 chip with psram. And I'm going to test it tomorrow.

jczic commented 5 years ago

Ok