Skip to content

Do not use React svg components for regularly used icons #5865

Open
@slorber

Description

@slorber

Have you read the Contributing Guidelines on issues?

Motivation

This issue about updating the number of visible archived versions in the version dropdown lead to a weird build size diff on HTML files:

#5862 (comment)

The diff in size is due to using an inlined SVG component for external links 😅 the SVG markup is duplicated in the HTML file for each item

image

For reusable icons of our theme, we should rather require an svg file instead of using a React SVG component, to reduce HTML output size.

It can have a significant impact on pages with a lot of icons (due to navbar, footer, doc sidebar...)

Self-service

  • I'd be willing to do some initial work on this proposal myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain: performanceRelated to bundle size or perf optimizationproposalThis issue is a proposal, usually non-trivial change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions