[Libwebsockets] Removing pre-v13 protocols + other optimizations

"Andy Green (林安廸)" andy at warmcat.com
Mon Jan 21 06:36:17 CET 2013


Hi -

I committed a patch to remove everything about pre-v13 websocket protocols

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=5738c0e838c7b4e95310a159a478325261205fe7

If you're using a modern browser, you won't notice anything since it has 
been using v13 for a while.  Everything before that can be regarded as 
deprecated anyway.

Wow a lot of cruft came out.

As documented here

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=ab40eaa8db6139c01ddbba5bd77584dcd98d92a3

it's now possible to get a v13 websocket + http server from 
libwebsockets in under 12K of (ARM) code using

./configure --without-client --without-extensions --disable-debug 
--enable-nofork --without-daemonize

and another big patch today

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=623a98dab00445ccbdf1887a2d56e4cf79033bf6

unionizes the struct libwebsocket members according to where their usage 
is mutually exclusive.  That halves the per-connection allocation from 
8.7KBytes to 4.4KBytes, it's 9.2KBytes -> 4.8KBytes on x86_64.

-Andy



More information about the Libwebsockets mailing list