Bugfix/fix linear time search for registrations#157
Bugfix/fix linear time search for registrations#157zyclonite merged 4 commits intovert-x3:masterfrom
Conversation
- The original implementation flatten all the registrations into the keys of the Map. When we need to search for all registrations of an address, it uses query() and the complexity essentially grows with the number of registrations linearly. - Instead, we should make use of the constant time asscess in Map that we store address as the key so that when we search for all registrations, we directly get the result and we don't have to do linear time search among all registrations.
|
thank you for your contribution, i will take a look do you have some performance number before and after? |
|
maybe something like that would work to keep atomicity 690f977 |
That should be the way to go. Thanks for showing me how to use ignite. |
|
In case you would like to collaborate on this PR. |
This reverts commit bce6cee.
|
I reverted the ScanQuery change to |
|
The failed test case succeeds in my local environment. I'm not sure if I can provide any help for the CI. |
|
let me restart the build |
|
looks good, may i ask you do open a PR for the 5.0 branch as well |


Motivation:
I'm switching between different cluster-managers in
Vertxand I found out that in one situation,IgniteClusterManagerperforms way slower thanHazelClusterManager. I have oneVerticlefrequently publishing to addresses that have not been subscribed by any consumer yet. Vertx continues to invokeclusterManager->getRegistrations(), andSubsMapHelper->get()takes up lots of cpu time. Having a look at the implementation betweenHazelClusterManagerandIgniteClusterManagersuggests that theIgniteClusterManager->SubsMapHelper->get()has performance issue when the number of registrations are large.Solution: