1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Richard Schneeman
951ec03256 Merge pull request #19902 from khundawg/dm-active-support-subsciber-doc
[ci skip] Update ActiveSupport::Subscriber documentation
2015-04-25 21:44:36 -05:00
DAVID MOORE
4c945cccb5 [ci skip] Update ActiveSupport::Subscriber documentation 2015-04-25 22:09:30 -04:00
Scott Walkinshaw
25b3f738e4 Update ActiveSupport::Subscriber docs
For consistency purposes with the changes done in https://github.com/rails/rails/pull/12285
2015-03-24 11:10:15 -04:00
eileencodes
fcfca5c700 Reduce object allocations in ActiveSupport::Subscriber
Freezing the string literal reduces the number of objects allocated
during integration test runs.

AllocationTracer before:
```
[["/rack/lib/rack/utils.rb", 499, :T_STRING], [50939, 2737, 78553, 0, 13, 1783920]]
[["/rails/activesupport/lib/active_support/subscriber.rb",
99, :T_STRING], [44959, 0, 42633, 0, 2, 1670800]]
[["/rack/lib/rack/utils.rb", 662, :T_STRING], [32979, 0, 31263, 0, 1, 1226009]]
[["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29988, 0, 28438, 0, 1, 1114320]]
[["/rails/activesupport/lib/active_support/callbacks.rb", 165, :T_DATA], [29968, 0, 28422, 0, 2, 3675936]]
```

AllocationTracer after:
```
[["/rack/lib/rack/utils.rb", 499, :T_STRING], [50983, 4080, 67269, 0, 12, 1815600]]
[["/rack/lib/rack/utils.rb", 662, :T_STRING], [33001, 0, 28420, 0, 2, 1230809]]
[["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29990, 0, 25812, 0, 1, 1118000]]
[["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [29986, 0, 25803, 0, 1, 1117840]]
[["/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [29984, 28, 26133, 0, 11, 4953280]]
2015-02-11 11:01:13 -05:00
Rafael Mendonça França
fd119467b6 Merge pull request #15037 from roccoblues/fix_duplicate_activesupport_subscribers
Fixed duplicate subscribers in ActiveSupport::Subscriber

Conflicts:
	activesupport/CHANGELOG.md
2014-05-16 21:13:34 -03:00
Dennis Schoen
b50468d13d Fixed duplicate subscribers in ActiveSupport::Subscriber
ActiveSupport::Subscriber no longer creates multiple subscribers when
you redefine a method.
2014-05-09 11:16:18 +02:00
Aaron Patterson
5584ddc43d Stop using method missing for singleton delegation.
This saved about 46 array allocations per request on an extremely simple
application.  The delegation happened in the notification subsystem
which is a hotspot, so this should result in even more savings with
larger apps.

Squashed commit of the following:

commit 41eef0d1479526f7de25fd4391d98e61c126d9f5
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Wed Nov 6 16:32:31 2013 -0800

    speed up notifications

commit 586b4a18656f66fb2c518fb8e8fee66a016e8ae6
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Wed Nov 6 16:31:05 2013 -0800

    speed up runtime registry methods

commit b67d074cb4314df9a88438f785868cef77e583d7
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date:   Wed Nov 6 16:28:12 2013 -0800

    change method name and make it public
2013-11-06 16:32:47 -08:00
Daniel Schierbeck
d2824a347f Allow attaching to AS::Notifications namespace up front
Before, you were required to attach *after* adding the methods to the
class, since the attachment process needed the methods to be present.

With this change, any new method will also be attached to the configured
namespace.
2013-09-20 10:14:28 +02:00
wangjohn
be7e34bc1e Created a registry based on the +PerThreadRegistry+ module for
subscriber queues. Helps limit the number of thread locals.
2013-04-22 09:18:37 -04:00
Rafael Mendonça França
12d839cdaf Copy-edits in the ActiveSupport::Subscriber documentation.
Thank you @fxn 💚💛❤️💜💙

[ci skip]
2013-04-16 11:51:35 -03:00
Daniel Schierbeck
5f07048dfd Extract a base class from ActiveSupport::LogSubscriber
Adds a ActiveSupport::Subscriber base class that LogSubscriber inherits
from. By inheriting from Subscriber, other kinds of subscribers can take
advantage of the event attachment system.
2013-04-16 14:39:22 +02:00