diff options
author | John Hawthorn <john@hawthorn.email> | 2019-02-01 08:52:18 -0800 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-02-01 12:11:19 -0800 |
commit | de13ed9ec740feaa5fdb48f338d36581d7ce2e3f (patch) | |
tree | 9947225e474839fa2cc88b58d7dd7fdc64bc6888 /rails.gemspec | |
parent | 630a343f739a1ba29cf93dc149fff6e3e0a00b05 (diff) | |
download | rails-de13ed9ec740feaa5fdb48f338d36581d7ce2e3f.tar.gz rails-de13ed9ec740feaa5fdb48f338d36581d7ce2e3f.tar.bz2 rails-de13ed9ec740feaa5fdb48f338d36581d7ce2e3f.zip |
Make Notifications::Fanout#listeners_for faster
Previously we stored all subscribers in an array, and every time a new
message name came in asked each subscriber if they responded to the
message.
This commit changes Fanout to hash subscribers with a String pattern by
their pattern. This way we can look them up directly and only do the
O(N) scan over the non-string (Regex or any) patterns.
Diffstat (limited to 'rails.gemspec')
0 files changed, 0 insertions, 0 deletions