libwebsockets/lib
Andy Green d738f84ed1 timeout move to doubly linked list
In the case we have a lot of connections, checking them all for timeout state
once a second becomes burdensome.  At the moment if you have 100K connections,
once a second they all get checked for timeout in a loop.

This patch adds a doubly-linked list based in the context to each wsi, and
only wsi with pending timeouts appear on it.  At checking time, we traverse
the list, which costs nothing if empty because nobody has a pending timeout.

Similarly adding and removing from the list costs almost nothing since no
iteration is required no matter how big the list.

The extra 8 or 16 bytes in the wsi are offset a little bit by demoting .pps
from int to char (save 3 bytes).  And trim max act exts to 2, since we only
provide one, saving 8 /16 bytes by itself if exts enabled.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-01-19 04:32:14 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
alloc.c Subject: [PATCH] Add custom allocator support using the realloc() interface 2014-12-05 07:25:24 +08:00
base64-decode.c mbed3 warning cleaning 2015-11-14 16:31:01 +08:00
client-handshake.c use lws_close not raw close 2016-01-16 11:14:46 +08:00
client-parser.c extension permessage deflate 2016-01-11 11:34:01 +08:00
client.c avoid using deallocated things during context dedtroy 2016-01-18 12:07:07 +08:00
context.c avoid using deallocated things during context dedtroy 2016-01-18 12:07:07 +08:00
daemonize.c clean internal refactor 2015-12-17 17:03:59 +08:00
extension-permessage-deflate.c permessage deflate male callback VISIBLE 2016-01-15 22:16:54 +08:00
extension-permessage-deflate.h extension permessage deflate 2016-01-11 11:34:01 +08:00
extension.c extension permessage deflate 2016-01-11 11:34:01 +08:00
getifaddrs.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
getifaddrs.h Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
handshake.c extension permessage deflate 2016-01-11 11:34:01 +08:00
header.c extension permessage deflate 2016-01-11 11:34:01 +08:00
hpack.c http header malloc pool implement pool 2015-12-25 14:34:20 +08:00
http2.c extension permessage deflate 2016-01-11 11:34:01 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lextable-strings.h whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
lextable.h Add PATCH, PUT, DELETE methods 2015-01-26 11:25:13 +08:00
libev.c clean libev.c style 2016-01-09 08:13:55 +08:00
libwebsockets.c timeout move to doubly linked list 2016-01-19 04:32:14 +08:00
libwebsockets.h cleaning 2016-01-18 11:16:20 +08:00
lws-plat-mbed3.c clean internal refactor 2015-12-17 17:03:59 +08:00
lws-plat-mbed3.cpp lws_get_context not _ctx 2015-12-17 18:25:25 +08:00
lws-plat-unix.c lws_interface_to_sa 2016-01-16 12:09:38 +08:00
lws-plat-win.c lws_interface_to_sa 2016-01-16 12:09:38 +08:00
minihuf.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
minilex.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
output.c extension permessage deflate 2016-01-11 11:34:01 +08:00
parsers.c fuzzer rx overflow mitigate 2016-01-12 23:05:02 +08:00
pollfd.c extension permessage deflate 2016-01-11 11:34:01 +08:00
private-libwebsockets.h timeout move to doubly linked list 2016-01-19 04:32:14 +08:00
server-handshake.c fuzzer eliminate hsecond ah free path firing assert sentinel 2016-01-13 05:01:17 +08:00
server.c avoid using deallocated things during context dedtroy 2016-01-18 12:07:07 +08:00
service.c timeout move to doubly linked list 2016-01-19 04:32:14 +08:00
sha-1.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
ssl-http2.c clean internal refactor 2015-12-17 17:03:59 +08:00
ssl.c ssl add ECDH server support 2016-01-15 16:21:51 +08:00