Skip to content

Renders are slow when binding to clientWidth or clientHeight inside of keyed-each block #8272

@mhkeller

Description

@mhkeller

Describe the bug

If you have a component that does a bind:clientWidth or bind:clientHeight inside of a keyed-each block, when you re-render, the page will get increasingly slow until it freezes.

This came up here since my library by default binds to clientWidth and clientHeight so it can't easily be used that well inside of keyed each blocks mhkeller/layercake#113

Reproduction

https://svelte.dev/repl/80c226b9830f4dfa8de5e70e7c83f7e0?version=3.55.1

Logs

No response

System Info

REPL, Svelte 3.55.1

Severity

annoyance

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