Skip to content

Memoize permanence calculator costs based on parameters #178

@katamartin

Description

@katamartin

permanence-calculator-flicker

The risk parameter introduces randomness into the cost calculation, which means that when risk > 0, the cost will vary on each calculation. Because we recalculate the cost on every render, we sometimes flash different results for the same combination of parameters (e.g., on screen resizing), which might be confusing without full context.

Memoizing this calculation based on the parameters should fix this and would be a nice little UI improvement!

Metadata

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