Skip to content

Cancellation performance regression in between 1.8.1 and 1.9.0 #4529

@fzhinkin

Description

@fzhinkin

After updating coroutines version from 1.8.1 to 1.9.0 (androidx/androidx@8d8805e), Compose's benchmarks heavily relying on cancellation showed 10% performance regression.

Affected benchmarks include:

I was able to reproduce the regression locally, and for EffectsBenchmark.launchedEffect_remove with a count parameter set to 100 median execution time dropped from 1.4 msec to 1.6 msec.
KotlinCoroutinesBenchmark.cancelCoroutineScopeWithJobs100's median time dropped from 7.7 msec to 8.2 msec.

It seems like it all might be related to 2803a33, but I was not able to formally confirm that yet.

The issue was originally found and reported by @ShikaSD

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions