Skip to content

coverband tracking shape_too_complex #490

Open
@danmayer

Description

@danmayer

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions