Skip to content

adjust dispatch_timer_short to control testing time #119

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

Merged
merged 1 commit into from
Jul 21, 2016

Conversation

dgrove-oss
Copy link
Contributor

Reduce N (number of suspended timers) from 100000 to 25000
to make it suitable for running in CI environment.
Test case execution time on Linux appears to be roughly quadratic
in N. Setting N to 25000 yields a test that runs in about 30
seconds; at 100000 the test takes around 15 minutes to run.

Profiling says that 99% of test execution is spent in
_dispatch_timers_update.

Reduce N (number of suspended timers) from 100000 to 25000
to make it suitable for running in CI environment.
Test case execution time on Linux appears to be roughly quadratic
in N.  Setting N to 25000 yields a test that runs in about 30
seconds; at 100000 the test takes around 15 minutes to run.

Profiling says that 99% of test execution is spent in
_dispatch_timers_update.
@dgrove-oss
Copy link
Contributor Author

If the quadratic performance is unexpected, I can open a bug to track it.

@MadCoder
Copy link
Contributor

the quadratic performance is sadly expected, because that's how timers are implemented in dispatch today. I do consider it a bug, but dispatch never was written to scale to that many timers to boot.

@MadCoder MadCoder merged commit 3ce8734 into swiftlang:master Jul 21, 2016
@dgrove-oss dgrove-oss deleted the dispatch_timer_short branch July 22, 2016 00:10
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