Skip to content

Commit

Permalink
Merge pull request #717 from vprigent/reduce-mem-allocation
Browse files Browse the repository at this point in the history
Memoize call_stack registry for same key entry
  • Loading branch information
flyerhzm authored Oct 7, 2024
2 parents 3193a7d + 0c74d2b commit b6a3a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bullet/registry/call_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Registry
class CallStack < Base
# remembers found association backtrace
def add(key)
@registry[key] = Thread.current.backtrace
@registry[key] ||= Thread.current.backtrace
end
end
end
Expand Down

0 comments on commit b6a3a8f

Please sign in to comment.