-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Simple observable collection optimizations #149
Simple observable collection optimizations #149
Conversation
Thanks a lot! Let me know when you're ready to merge. (PS, you can mark PRs as "drafts" or something like that when you create them, to signal if you don't want them merged right away.) @reinux do you want to give this PR a spin to check how much it impacts the performance you mentioned in #113 (comment)? |
Works great! Down from about 250ms per update to 120ms. Haven't set up any proper tests, but it seems to work as expected. The Seq.find is definitely the other big bottleneck at the moment. Thanks, @bender2k14! |
@reinux @bender2k14 Do you think the dictionary stuff in #137 (comment) could work well in this PR? |
The |
Indeed. Of all the planning that I did for this PR, I didn't notice that replacing |
I added a commit that calls |
Seems that commit broke some tests. Could you investigate? |
Oh, I had an improvement to that commit that I forgot to include. I force pushed a new commit. The tests all pass for me. The previous commit had the correct behavior, but raised more (clear) events than it needed to. It is great to see that there are some tests that noticed the difference. |
b5d54cd
to
c923fca
Compare
My pleasure :)
I am ready. I have reviewed my changes several times and have done some manual testing. I think everything is working.
Oh, great. I will keep that in mind for next time. |
In #134 (comment) you mention adding a test; should that be part of this PR or should I go ahead and merge? (If it's related to the changes in this PR, it should ideally be part of it.) |
It makes sense to add the test to this PR. Coming soon! |
It took me longer than I expected to write the test. The good news though is that I think it is complete. I have it failing on |
c52a5ec
to
086d350
Compare
Done! :D Ready to merge |
Thanks a lot! Will try to review and merge tomorrow. |
086d350
to
c3f76fd
Compare
Fixes #134 and partially addresses #137 by implementing all of the "simple" optimizations.
I have not tested anything yet. I will test later.
The two remaining more complicated optimizations are removing all elements that need to be removed in nearly linear time (as discussed here) and ordering in nearly linear time (as discussed here).