Skip to content

inner_html is slow #60

@bicarlsen

Description

@bicarlsen

inner_html, used in <Icon> is very slow at scale because it uses web_sys::Element::set_inner_html which uses the Element::innerHTML setter JS call behind the scenes, which is known to be slow.

I have an app where I render many <Icon>s. This caused a massive slow down. Profiling showed the cause of the slow down was due to set_inner_html calls. @gbj tracked it down to the call referenced above.

Is there another way to set the inner HTML for the icons? Can we statically compile them rather than set them with JS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions