-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cache callbacks for long running processes #1566
Comments
I'd like to give it a try. Sounds like a nice challenge |
The hard part is figuring out how to measure the improvements (or lack thereof). It might not be worth outside of receiving Erlang messages (the network is likely slower). |
Maybe we could measure the execution time with those Erlang profiling tools? |
Profiling tools are useful but the deciding factors for performance improvements in Cowboy are latency and throughput so for Websocket for example this means being able to make the clients either receive data faster than before, or receive more data than before, for specific workloads. Currently the only such measurements we have are the run times of the Autobahn test suite. |
I have tried caching Websocket callbacks while optimising Websocket. I have not observed any improvements. I do not think improvements can be observed except in very tight loop handling many Erlang messages. The added complexity does not seem relevant for other messages (such as data coming in from/to sockets). So I am closing this until it can be otherwise proven that it does help performance. |
See erlang/otp#5831 for details as to why it's faster to do that. Might not be worth doing in many parts of Cowboy, but some like Websocket or the loop handlers may benefit from this.
The text was updated successfully, but these errors were encountered: