Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore coroutines-based sequence and iterator builders in coroutine debugger #3782

Closed
qwwdfsad opened this issue Jun 19, 2023 · 0 comments
Closed

Comments

@qwwdfsad
Copy link
Collaborator

Follow-up of #3527 and IDEA discussion.

Currently, sequential coroutine builders are part of the debugger: their states are being tracked, and they can be seen in IDEA "Coroutine debugger" pane under "Empty dispatcher".

The code with such builders is short-lived, blazing fast (e.g. no real concurrency involved), and, in fact, can be used as a more stylish or idiomatic way to generate a plain old sequence/array/list.
In such scenarios, the overhead of DebugProbes becomes visible (efe80a1): depending on the workload, the behaviour of concurrently executed coroutines and timings, the performance of sequence builders might take up to 50% hit (in our IDEA's codebase it is around 25-30% and is important to the extent that code is rewritten from coroutine-based builders to iterators), becoming quite a non-zero cost abstraction.

Apart from that, the state of the sequence builder doesn't seem to add any value to the debugging experience -- it's always linear, non-concurrent, and cannot contribute to the system observability and/or progress (-> is never the source of the deadlock/livelock with coroutines).

Taking it into account, my suggestion is to explicitly filter them out in the debugger if it's possible

qwwdfsad added a commit that referenced this issue Jun 20, 2023
Such coroutines typically are a subject for significant debugger overhead, can be observed with more conventional tools, and do not contribute to the state of the system that is typically observed with coroutines debugger

Fixes #3782
qwwdfsad added a commit that referenced this issue Jun 28, 2023
Such coroutines typically are a subject for significant debugger overhead, can be observed with more conventional tools, and do not contribute to the state of the system that is typically observed with coroutines debugger

Fixes #3782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant