-
Notifications
You must be signed in to change notification settings - Fork 428
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
Less stringprepping in roster hooks #2997
Conversation
df64e46
to
b9307f5
Compare
8980.1 / Erlang 23.0.3 / small_tests / fe00bff 8980.2 / Erlang 23.0.3 / internal_mnesia / fe00bff 8980.4 / Erlang 23.0.3 / mysql_redis / fe00bff 8980.3 / Erlang 23.0.3 / odbc_mssql_mnesia / fe00bff 8980.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / fe00bff 8980.5 / Erlang 23.0.3 / riak_mnesia / fe00bff 8980.6 / Erlang 23.0.3 / ldap_mnesia / fe00bff 8980.9 / Erlang 22.3 / pgsql_mnesia / fe00bff |
8982.1 / Erlang 23.0.3 / small_tests / dfab0a3 8982.2 / Erlang 23.0.3 / internal_mnesia / dfab0a3 8982.3 / Erlang 23.0.3 / odbc_mssql_mnesia / dfab0a3 8982.4 / Erlang 23.0.3 / mysql_redis / dfab0a3 8982.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / dfab0a3 8982.6 / Erlang 23.0.3 / ldap_mnesia / dfab0a3 8982.5 / Erlang 23.0.3 / riak_mnesia / dfab0a3 8982.9 / Erlang 22.3 / pgsql_mnesia / dfab0a3 |
Codecov Report
@@ Coverage Diff @@
## master #2997 +/- ##
==========================================
- Coverage 79.12% 79.09% -0.04%
==========================================
Files 377 377
Lines 32840 32835 -5
==========================================
- Hits 25986 25971 -15
- Misses 6854 6864 +10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Thanks for keeping this coming and improving the performance step by step.
|
||
% Deprecated Hooks | ||
-export([ | ||
% get_user_roster/2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it means that get_user_roster/2
that is accepting tuple of binaries is to be deprecated. It's clear after reading the code, but just looking at the exports and comparing with line 59 is slightly confusing. Maybe we could extend the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment extended 😄
Mark old hooks as deprecated, some better code patterns using jid:to_bare, no export of a function that is not needed.
b9307f5
to
1a25d28
Compare
9009.1 / Erlang 23.0.3 / small_tests / ad63568 9009.2 / Erlang 23.0.3 / internal_mnesia / ad63568 9009.3 / Erlang 23.0.3 / odbc_mssql_mnesia / ad63568 9009.4 / Erlang 23.0.3 / mysql_redis / ad63568 9009.5 / Erlang 23.0.3 / riak_mnesia / ad63568 9009.6 / Erlang 23.0.3 / ldap_mnesia / ad63568 9009.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / ad63568 9009.9 / Erlang 22.3 / pgsql_mnesia / ad63568 |
This PR, like several others I've done in the past, aim to reduce the redundancy of stringprepping again and again different blocks of a jid all over the MIM code, and instead taking advantage of the
jid
record. More type-safety, less code, and a tiny slightly bit more performance.