Skip to content

JS walker computes styles for form controls that never use them #106

Description

@morisil

Found in the review of the capture-live-form-state branch.

formControlState() in ElementToSemanticEvents.kt calls isMasked() — a getComputedStyle — for every <input>, including checkbox / radio / submit / hidden / file, where formControlAttributes never reads masked.

Scenario: a search page with hundreds of filter checkboxes pays one computed-style lookup per checkbox, all discarded.

Fix: check the input type first, or compute masked lazily (e.g. pass a () -> Boolean, or let FormControls.kt expose which types need it).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions