Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Optimisation #51

Merged
merged 1 commit into from
Feb 9, 2016
Merged

Optimisation #51

merged 1 commit into from
Feb 9, 2016

Conversation

dcorbacho
Copy link
Contributor

* Use lists:keyfind instead of proplists to speed up the management stats
@michaelklishin
Copy link
Member

@dcorbacho I'm sure this was a change driven by benchmarks used in rabbitmq/rabbitmq-management#41 but out of curiosity, how much difference does it make for this specific function, %-wise?

@michaelklishin michaelklishin added this to the n/a milestone Feb 8, 2016
@dcorbacho
Copy link
Contributor Author

@michaelklishin proplists is ~7x slower than lists. Querying the queues in management DB, for 62k queues it was called at least 824k times, so the improvement is noticeable.

Lists are a BIF, while proplists is not and does some verification on the structure of the list: https://github.com/erlang/otp/blob/maint/lib/stdlib/src/proplists.erl#L208

@michaelklishin
Copy link
Member

Thanks for the clarification.

@michaelklishin
Copy link
Member

This can be merged separately from the rest of management#41.

michaelklishin added a commit that referenced this pull request Feb 9, 2016
@michaelklishin michaelklishin merged commit f89be36 into stable Feb 9, 2016
@dumbbell dumbbell deleted the rabbitmq-management-41 branch January 2, 2018 14:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants