Skip to content

Low CPU saturation #968

@MichaReiser

Description

@MichaReiser

I noticed that running ty on a large project overall shows low CPU saturation (specifically the longer checking runs)

Screencast.From.2025-08-11.10-57-43.mp4

I did record a CPU profile and one thing that stands out is that we spend a lot of time in salsa's intern_id for CallableType

Image

(full profile)

and

Image

All call sites come from ReachabilityConstraints::evaluate.

Ideally, we'd reduce the cost of interning in salsa. If that doesn't work, we may want to take a look if we can reduce the number of callable types that we construct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePotential performance improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions