Some coroutines are very likely to get cancelled a short time after they are launched, making the CancellationException stacktrace calculation into a large portion of the runtime.
Examples:
This calls for an API that allows not populating the stacktraces but instead using a CancellationException object created in advance.
Options:
- Cancel-site: cancelalready can accept customCancellationExceptionvariants, andwithTimeout*could also be parameterized to allow this.
- Throw-site: suspendCancellableContinuationcould react to a specialCoroutineContextElementspecifying that the cancellation exception of the suspended coroutine itself does not need to be instantiated.