Closed casperisfine closed 1 year ago
looks cool to me, should we only show / handle this option on Ruby 3.2 and up ... or is this going to complicate arg parsing etc... too much?
Hum, I don't think it would be particularly hard, it's just a couple if RUBY_VERSION >=
That said, that's the version of the rbtrace client, maybe the process you attach to does have it.
Ultimately I don't think it's a big deal overall. Maybe we could just return a cleaner error if that method isn't defined?
K ... yeah maybe we just clean up the error... will merge for now.
If we could add something to our readme pointing people at what to do with the shapedump (some blog post or something) it would be amazing.
(some blog post or something)
I don't know of yet yet, but I'm likely to write one one day.
In the meantime https://github.com/Shopify/heap-profiler will parse shapes dump and produce a top edge list.
ObjectSpace.dump_shapes
was added in 3.2, it works likedump_all
but only dumps the shapes, so it's much much faster.It's very useful to optimize Ruby 3.2.
cc @SamSaffron