-
Notifications
You must be signed in to change notification settings - Fork 34
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
How does this compare to Beast? #5
Comments
If you are doing an embedded project and you cross- compile for example using Beast. you will see the difference. This one is good in term of performance. Libwebsocket (the base lib used here before wrapping https://libwebsockets.org/ ) is widely used in embedded linux .... at the end you get almost 0% of CPU usage and much better memory performance (very small memory occupation). If there are for example many clients connected , request/response handling will perform much better. |
@boubakerbassem That sounds good in theory, but a comparison of autobahn performance test results of libwebsockets versus Beast tells quite a different story (lower is better):
Sources: |
@vinniefalco In theory I think the story is a bit different . The question will be : are we comparing performance in an embedded linux or not? Beast is depending on BOOST witch : 1- uses a lot of dynamic memory allocation (not good if you work under memory limitation). 2-By using boost, your instantiating some other classes and this will have some cost effects (a class will call another that will call another etc....). 3-Boost is not using reference for passing variables into functions. So, every time a function is called, the variable will be copied into a temporary one before entering the function ( a lot of wasted stack memory if you are passing some complex typed variable ). I should remind that copying input variables itself do have some cost too. Most of good embedded c++ developer are avoiding projects with BOOST dependencies for these reasons. At least I do :D |
How does this compare to Beast, which offers WebSocket and HTTP implementations?
http://vinniefalco.github.io/
The text was updated successfully, but these errors were encountered: