Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverband tracking shape_too_complex #490

Open
danmayer opened this issue Nov 4, 2023 · 0 comments
Open

coverband tracking shape_too_complex #490

danmayer opened this issue Nov 4, 2023 · 0 comments

Comments

@danmayer
Copy link
Owner

danmayer commented Nov 4, 2023

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant