Skip to content

Avatar group not performant #6282

@danielvanmil

Description

@danielvanmil

Description

We render a lot (> 200) of avatar groups in a calendar overview which makes the component slow (rendering takes over 5 seconds)
Some performance analysis lead us to the avatar group performance, see screen Performance insights:

image

Expected outcome

Faster rendering

Minimal reproducible example

Pseudo Storybook code:

const items = new Array(500).fill(1);

// Renderer for the story
const render = ({}: Partial<SidebarProps>): TemplateResult =>
  html`
    ${items.map(
      (_y) =>
        html`
          <vaadin-avatar-group
            .items=${[
              {name: "XXX", colorIndex: 1, abbr: "xxx", withTooltip: false},
              {name: "yyy", colorIndex: 2, withTooltip: false},
            ]}
          ></vaadin-avatar-group>
        `
    )}
  `;

Steps to reproduce

See example

Environment

Vaadin version(s): 24.1.4
OS: -

Browsers

Chrome

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions