message_bus icon indicating copy to clipboard operation
message_bus copied to clipboard

Unknown delay when delivering chunked messages

Open antulik opened this issue 4 years ago • 1 comments

When using long polling I discovered there is a significant delay when message is written to client's IO

https://github.com/discourse/message_bus/blob/12dd450c213cc4332a157b960cf77730c18078b7/lib/message_bus/connection_manager.rb#L34-L36

and when the message is sent through the network. It varies but usually within the range 300-1000ms.

ActionController::Live in comparison sends data as soon as it is written (0ms delay)

Do you have any clues where that delay might come from?

I tried locally with Rails development and production mode on MacOS.

antulik avatar Sep 20 '20 00:09 antulik