Description
Is your feature request related to a problem? Please describe.
no just a new feature
Describe the solution you'd like
Being able to track things at runtime that emit shape to complex would be a nice use of a custom tracker
Describe alternatives you've considered
probably could just use logs in many cases and should consider that
Additional context
this idea is inspired by: https://railsatscale.com/2023-10-24-memoization-pattern-and-object-shapes/
The one thing that is best avoided though, is SHAPE_TOO_COMPLEX as it is not only slower but consumes more memory. To help with that, starting in Ruby 3.3 a warning will be emitted when a class is marked as too complex, and it can be enabled by setting Warning[:performance] = true or passing -W:performance to the command line:
Activity