Skip to content

Decimal arithmetic in performLayout is expensive #121

@andyhorn

Description

@andyhorn

_getExpandSizes in lib/src/layout/resizable_layout.dart:203-256 runs Decimal math each layout pass. Conversion via Decimal.parse(toString()) (lib/src/extensions/num_ext.dart:4) is allocation-heavy and called repeatedly.

Pixel layout doesn't require rational precision. A double-based water-filling pass with a final rounding fixup would be substantially cheaper.

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