Skip to content
  • John Hawthorn's avatar
    f4014f73
    Call AS::Notifications.instrument directly in AV · f4014f73
    John Hawthorn authored
    The instrument helper we had here would allocate a new string object for
    the key each time it was called and also added two stack frames. The
    interpolated strings are also _slightly_ slower to hash since they
    aren't fstrings.
    
    Though this was shorter before, I think this is a little more preferable
    as a code style since the subscribed keys are now greppable. After this,
    there's still one other place this pattern is used (in ActiveSupport
    cache).
    f4014f73
    Call AS::Notifications.instrument directly in AV
    John Hawthorn authored
    The instrument helper we had here would allocate a new string object for
    the key each time it was called and also added two stack frames. The
    interpolated strings are also _slightly_ slower to hash since they
    aren't fstrings.
    
    Though this was shorter before, I think this is a little more preferable
    as a code style since the subscribed keys are now greppable. After this,
    there's still one other place this pattern is used (in ActiveSupport
    cache).
Loading