Skip to content

Avoid cost of setting display:none under legacyOptimizations #5541

@kevinpschaaf

Description

@kevinpschaaf

Description

#4821 addressed the fact that <dom-repeat> and <dom-if> elements can participate in e.g. flexbox and other selectors inadvertently, which was a change from Polymer 1.x where these were <template> type extensions, by adding this.style.display = 'none' to the elements' lifecycle. Although it fixed the issue, it unfortunately has been found to add a measurable tax to element boot-up, particularly on Edge, which is unfortunate if e.g. flexbox issues can otherwise be avoided.

This issue is to only set display: none when not running under the legacyOptimizations flag, as a way to opt-out of the correct behavior to optimize for performance.

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