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

Turn off optimization mode when compiling tests for K/N #4157

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

homuroll
Copy link
Contributor

Optimization was turned on due to performance problems. However, with new K/N memory manager these performance problems seem to be fixed. On the other hand, compiling in optimized mode significantly increases the compiler's memory consumption, so it's better to turn it off.
In particular, we (in K/N team) are having some problems with updating to LLVM 16 due to increased memory consumption (it's still being investigated what causes it), more details here: https://youtrack.jetbrains.com/issue/KT-68418/Native-updating-to-LLVM-16-makes-kotlinx.coroutines-build-in-Aggregate-unstable. This commit workarounds it.

Optimization was turned on due to performance problems. However, with new K/N memory manager
these performance problems seem to be fixed. On the other hand, compiling in optimized mode
significantly increases the compiler's memory consumption, so it's better to turn it off.
@homuroll homuroll changed the base branch from master to develop June 18, 2024 10:16
@homuroll homuroll requested a review from qwwdfsad June 18, 2024 10:17
Copy link
Collaborator

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a tiny degradation in Native test times and compilation speed improvement.

Waiting for the stats from Igor and it's good to go

@homuroll
Copy link
Contributor Author

homuroll commented Jun 25, 2024

Some numbers:

  • 2nd run of ./gradlew clean :kotlinx-coroutines-core:linkDebugTestMacosArm64 sped up from ~69 sec to ~19 sec
  • but the running time of the test binary increased from ~38 sec to ~49.5 sec

The difference between the optimized binary and the non-optimized one is noticeable but I believe it's not as bad as it used to be and won't be a problem.

@qwwdfsad qwwdfsad merged commit aadaac3 into develop Jun 25, 2024
1 check passed
@qwwdfsad qwwdfsad deleted the turn_off_opt_for_tests branch June 25, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants