How to fix performance issues with angular-fontawesome icons

Discussão em 'Angular' iniciado por Julian Re, Novembro 6, 2024.

  1. Julian Re

    Julian Re Guest

    I was debugging my angular application to see which components might have caused performance issues. On most screens, I found that the FaIconComponent has the most time spent to built.

    [​IMG]

    Is there any way to reduce the resources consumed by FaIconComponent?

    This is how I currently embed it in the template:

    <fa-icon
    [icon]="faInfoCircle"
    />


    faInfoCircle is an import from the respective @fortawesome. I tried replacing it with

    <fa-icon
    icon="info-circle"
    />


    but there was no significant improvement visible. Is having an icon just expensive itself? Are there any other libraries that are significantly more performant. Is this even worth to improve?

    Thanks!

    Continue reading...

Compartilhe esta Página