Re-think sprite icon loading for ECharts

The following discussion from gitlab-ce!29293 should be addressed:

(regarding the getSvgIconPathContent method introduced in gitlab-ce!24652 and used again in gitlab-ce!29293)

  • @mikegreiling started a discussion: (+1 comment)

    I had not noticed this method before, but this seems to be a really non-optimal way to retrieve SVG icons for use with ECharts. It performs a network request to gon.sprite_icons (I'm unsure if this will use the cached version of this from the browser or perform a new request), loads the entire thing into DOMParser, and filters for a selector. The process isn't cached, so a new axios request is generated for each use. IMHO this whole process ought to be performed at compile-time rather than at runtime.

Edited Jun 21, 2019 by Mike Greiling
Assignee Loading
Time tracking Loading