Skip to content

pixels/sizes/ratios getters allocate UnmodifiableListView per call #116

@andyhorn

Description

@andyhorn

lib/src/resizable_controller.dart:27, 30, 33 allocate a fresh UnmodifiableListView every access. With AnimatedBuilder rebuilding on each notify, hot paths read these getters many times per frame.

Fix: Cache the view once after each mutation. ratios additionally re-divides every element on each call — recompute lazily and cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions