deface
deface copied to clipboard
Memory allocations
I've noticed a peak of memory allocations in this file by using derailed gem
800 /Users/progm/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/deface-1.0.2/lib/deface/search.rb:13
400 /Users/progm/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/deface-1.0.2/lib/deface/override.rb:189
That could be simply fixed using a .freeze.
- Freezing empty strings
- use
compact!instead of compact