You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously we were running dispatcher.unsafeRunsync(io) for every single message we received from pubsub. This is a problem, because the io gets executed on the cats-effect io compute pool. So in order to just receive a message, the app needs to context switch from the subscriber thread to the cats-effect thread and back again. This is very inefficient, especially as we do it for every single event.
The solution is to stop using a Dispatcher inside the subscriber callback.
The text was updated successfully, but these errors were encountered:
Previously we were running
dispatcher.unsafeRunsync(io)
for every single message we received from pubsub. This is a problem, because theio
gets executed on the cats-effect io compute pool. So in order to just receive a message, the app needs to context switch from the subscriber thread to the cats-effect thread and back again. This is very inefficient, especially as we do it for every single event.The solution is to stop using a
Dispatcher
inside the subscriber callback.The text was updated successfully, but these errors were encountered: