Conversation
Use synchronization primitives instead of sleeping. This eliminates the need for the timeout parameter. The affected class is effectively internal, so this "should" not affect regular users. Also fixed the tests: they didn't clean up after themselves. Added benchmarks. Fixes #152
piskvorky
approved these changes
Nov 20, 2022
piskvorky
left a comment
Owner
There was a problem hiding this comment.
What does the new benchmark say? Did this PR affect performance much?
Collaborator
Author
|
On MacOS, there is a significant difference. Before (note time is in seconds): After (note time is in ms): On Linux, there is no difference in performance, but I could not reproduce the problem, the benchmark times are about the same (~300ms). |
Owner
|
Oh wow, 30x slower now? We'll have to look into that, that's too much. I'll try to check too (I have a macbook). |
Collaborator
Author
|
No, it's the other way around. Before it was 10s, now it's 338ms (0.338s). |
Owner
|
Oh yes, I missed the bracket with "note" of course :) Sorry. Great job! |
piskvorky
approved these changes
Nov 22, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use synchronization primitives instead of sleeping. This eliminates the need for the timeout parameter. The affected class is effectively internal, so this "should" not affect regular users.
Also fixed the tests: they didn't clean up after themselves.
Added benchmarks.
Fixes #152