-
Notifications
You must be signed in to change notification settings - Fork 592
Open
Labels
bugclient-v1issues applicable only for an old clientissues applicable only for an old clientenhancement
Description
NonBlockingInputStream has a busy loop in it, which consumes 100% CPU while it waits for data from server. Not only does it block the NonBlockingInputStream, but also it does it in a resource intensive way.
Describe the solution you'd like
Either add Thread.sleep(1) there or a more configurable wait strategy.
Describe the alternatives you've considered
One can also change queue implementation from AdaptiveQueue to some other queue which supports blocking waiting. But it contradicts the expected non blocking behavior of this class anyway.
Additional context
I am attaching a profile of my application collected by async profiler. One can see that about 86% of cpu time is spent in this place.
Metadata
Metadata
Assignees
Labels
bugclient-v1issues applicable only for an old clientissues applicable only for an old clientenhancement