3

I have been trying to improve one websocket application I wrote based on asyncio and websockets.

In the profiling output I see the most time consuming part is method 'control' of 'select.kqueue' objects: enter image description here

I do not really know what does this means:

  • Does this mean most of time I'm waiting for message?
  • Or does this mean I have too many tasks/coroutines that context switching is costing too much time?

1 Answer 1

1

It means that asyncio is waiting for new events, most likely for websocket incoming messages for your case.

Consider it as idle time.

Sign up to request clarification or add additional context in comments.

1 Comment

ah ok, thanks. So it's the server that is not fast enough, as I have plenty of bandwidth to spare

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.