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

perf: Websocket message aggregation #10979

Open
mmeeks opened this issue Jan 21, 2025 · 0 comments
Open

perf: Websocket message aggregation #10979

mmeeks opened this issue Jan 21, 2025 · 0 comments
Assignees
Labels
24.04 enhancement New feature or request performance Improving COOL performance

Comments

@mmeeks
Copy link
Contributor

mmeeks commented Jan 21, 2025

It is my suspicion that if we spin the main-loop with a 1ms sleep (as we do for message slurping) that we surrender our time-slice to the kernel - and that on a loaded system this can make COOL loose out performance-wise.

And we do this quite a lot I think; so we should try to aggregate many more messages into a single message over the top of the existing Websocket channel.

This requires a bit of JS work - and some extra framing inside the websocket messages themselves: with size + bytes etc. I guess. Possibly it will also break things - and force us to use 'Promise' methods on blobs in JS - which may exacerbate the problem we try to fix (ARGH! ;-) but possibly we can make this work.

I imagine jamming many tiles into one websocket message would be good, and/or reading the protocol to work out where we can unify other common messages - eg. state-changed into a single message perhaps saving protocol bandwidth as well as number-of-websocket-messages :-)

Thanks!

@mmeeks mmeeks added 24.04 enhancement New feature or request performance Improving COOL performance labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
24.04 enhancement New feature or request performance Improving COOL performance
Projects
Status: No status
Development

No branches or pull requests

2 participants