rstudio / httpuv

HTTP and WebSocket server package for R
Other
224 stars 84 forks source link

Support websocket compression (permessage-deflate) #377

Open jcheng5 opened 1 year ago

zeehio commented 8 months ago

On shiny websites with plotly plots with a large number of points, generating the plot is the first bottleneck. Once that is cached (bindCache...) the transfer of the plotly object from server to client becomes the bottleneck.

Having websocket per-message compression would reduce the cost of the transfer at the expense of compressing/decompressing each message.

Ideally, having some websocket-based caching system would be awesome, so the web browser does not download the same plot more than once. I would imagine httpuv sending a hash of the response first, and then, if the browser does not have anything matching that hash, the full response (maybe with compression as implemented here).

Thanks for all this work anyway... It's easy to suggest features, but it is much harder to implement them!

anthonynorth commented 5 months ago

Looking for permessage-deflate support in shiny led me here. Are there plans to merge this into main?