Skip to content

Pydantic perf regression related to normalizing TypedDicts #1845

@oconnor663

Description

@oconnor663

This was a known regression that came with astral-sh/ruff#21784.

The cause is calls to normalized that happen inside of FunctionType::has_relation_to_impl, as described here. Those calls are themselves a performance optimization, and deleting them fixes this regression, as described here. We'll want to come back to this after TypedDict "tagged union narrowing" is in (#1479 (comment)), to see how much of the regression remains.

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