fluent / sigdump

Use signal to show stacktrace of a Ruby process without restarting it
Apache License 2.0
188 stars 27 forks source link

Optimize dumping objects count #18

Closed fatkodima closed 1 year ago

fatkodima commented 1 year ago

Tested on a large heap - I got up to 3x speed improvement of this method.

Warming up --------------------------------------
          old_method     1.000  i/100ms
          new_method     2.000  i/100ms
Calculating -------------------------------------
          old_method      7.730  (± 0.0%) i/s -     39.000  in   5.045833s
          new_method     20.366  (± 0.0%) i/s -    102.000  in   5.009285s

Comparison:
          new_method:       20.4 i/s
          old_method:        7.7 i/s - 2.63x  slower

I love how this gem got 27m downloads and 0 tests 😄

daipom commented 1 year ago

@fatkodima Thanks for this fix! Sorry for the delay. Could you add DCO?

daipom commented 1 year ago

I added DCO to merge this. Thanks for your contribution!