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
We should investigate the usage of LinkedBlockingQueue - I believe that that queue is used in SPSC mode in which case the locking behaviour is a massive overhead. There are a few options floating about in the ecosystem (potentially one about to land in cats effect IIRC) that should be much more performant when combined with a dispatcher to run the enqueue actions
The text was updated successfully, but these errors were encountered:
Discussed offline but I have always been keen to move towards an fs2.Queue. It would need an unsafeRunSync to add elements to this queue, but that should be fine as the thread where that operation occurs is managed by the Google PubSub library and is designed to block to give backpressure.
Based on memory of conversations (@TimWSpence would remember better probably!) we think that it'd be better to unsafely enqueue (multiple threads) and safely dequeue (single thread) than the other way round. I may have remembered that wrong though. Also benchmarks would show us the right answer...
We should investigate the usage of
LinkedBlockingQueue
- I believe that that queue is used in SPSC mode in which case the locking behaviour is a massive overhead. There are a few options floating about in the ecosystem (potentially one about to land in cats effect IIRC) that should be much more performant when combined with a dispatcher to run the enqueue actionsThe text was updated successfully, but these errors were encountered: