Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up send using new chuncked process #104

Closed
luc-github opened this issue Jun 28, 2016 · 4 comments
Closed

speed up send using new chuncked process #104

luc-github opened this issue Jun 28, 2016 · 4 comments

Comments

@luc-github
Copy link
Owner

luc-github commented Jun 28, 2016

new feature is available in git - need to test it, should be able to divide by 2 the process template function time usage, as no more need 2 loops any more but 1

server.on("/chunked", HTTP_GET, [](){
  server.setContentLength(CONTENT_LENGTH_UNKNOWN);
  server.send(200);
  server.sendContent("<!DOCTYPE html><html><head><title>Chunked
Test</title></head><body>");
  server.sendContent("<p>Chunk 1</p>");
  server.sendContent("<p>Chunk 2</p>");
  server.sendContent("<p>Chunk 3</p>");
  server.sendContent("<p>Chunk 4</p>");
  server.sendContent("<p>Chunk 5</p>");
  server.sendContent("<p>Chunk 6</p>");
  server.sendContent("</html>");
  //not terminating will lead to the same 2 second delay as before
  server.sendContent("");//end of chunked (browser will close immediately)
});

esp8266/Arduino#2199

@luc-github
Copy link
Owner Author

luc-github commented Jul 3, 2016

Some timing done using chrome page load time extension:

Page No chunk with chunk performance
Home 2.08s 1.08s +48%
System 2.15s 1.10s +49%
Access Point 1.71s 0.98s +43%
Station 3.98s 3.10s +22%
Printer 5.43s 2.79s +49%
Settings 2.20s 1.17s +47%
Admin 1.79s 0.94s +48%

the low performance gain on station page is due to fact that most of the time used is used for scan not for page display unlike other pages

@luc-github
Copy link
Owner Author

The performance are even better with CPU160MHz

Page No chunk with chunk performance
Home 2.08s 0.80s +62%
System 2.15s 0.70s +67%
Access Point 1.71s 0.57s +67%
Station 3.98s 2.81s +29%
Printer 5.43s 1.74s +68%
Settings 2.20s 0.75s +66%
Admin 1.79s 0.67s +63%

@luc-github
Copy link
Owner Author

Implemented in b1456df

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant