Skip to content

Don't recalculate derived properties until next access #233

Open
@STRML

Description

I plan to submit a PR for this - opening this issue to track it.

The issue is that derived properties are often expensive, and any change to any dep causes a recalculate, even if the property has not been accessed.

Considering that derived props are already getters, dep changes should instead set a dirty flag (since delete self._cache[name] would cause deopt) which marks the property for recomputation.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions