-
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
MAM shaper touches #3641
MAM shaper touches #3641
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3641 +/- ##
=======================================
Coverage 81.02% 81.02%
=======================================
Files 427 427
Lines 31965 31968 +3
=======================================
+ Hits 25899 25903 +4
+ Misses 6066 6065 -1
Continue to review full report at Codecov.
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
use persistent terms.
- some general info on shapers :)
shapers = dict:new(), | ||
a_times = dict:new() | ||
shapers = #{}, | ||
a_times = #{} |
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.
oh, we don't need to store a_times separately.
Shaper has last_update field in the state. Ok, technically it is last_update + delay
, but should work as well.
We also don't need to store shaper at all, if their value is none
(but we can try to create them each time we want to update them). Even more, we probably could just do mongoose_config:lookup_opt([shaper, Name])
before we call the shaper_srv and exit fast.
Also, the whole shaper logic could probably be moved to ETS, but that is another topic :D
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.
Ok, these comments are out of the scope of this quick PR, I wasn't trying to build better shapers, but just rework generic code to make it faster, if you can reword these details and make it all better, that'd be awesome 🙏🏽
cc47bd2
to
8433f2b
Compare
small_tests_24 / small_tests / 8433f2b small_tests_23 / small_tests / 8433f2b dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8433f2b dynamic_domains_mysql_redis_24 / mysql_redis / 8433f2b dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 8433f2b dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 8433f2b ldap_mnesia_23 / ldap_mnesia / 8433f2b ldap_mnesia_24 / ldap_mnesia / 8433f2b internal_mnesia_24 / internal_mnesia / 8433f2b pgsql_mnesia_23 / pgsql_mnesia / 8433f2b elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 8433f2b pgsql_mnesia_24 / pgsql_mnesia / 8433f2b mysql_redis_24 / mysql_redis / 8433f2b mssql_mnesia_24 / odbc_mssql_mnesia / 8433f2b riak_mnesia_24 / riak_mnesia / 8433f2b |
Storing names instead of recalculating list_to_atom again and again, also moving from
dict
tomaps
.