Page MenuHomePhabricator

ArticleFeedback .svg icons contain 100 kb unused code each
Closed, ResolvedPublic

Description

While applying T328144: Drop PNG fallback for SVG icons / etc. across all Wikimedia products to the ArticleFeedbackv5 codebase we noticed (again) that a lot of the .svg files in the codebase contain extremely large <defs> sections with hundreds of gradients, masks, and filters. It looks like a copy of the entire Inkscape gradient library. This dead, unused code adds up to a total of 1.5 megabytes in only 14 files.

This is a problem because:

  1. These .svg files are actually used as background images in .css.
  2. Some of them are even marked as /* @embed */, which implies a ~33% increase in size when base64 encoded.

Proposed steps:

Event Timeline

Change 922818 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/ArticleFeedbackv5@master] Drop .png fallbacks where an .svg file is present

https://gerrit.wikimedia.org/r/922818

Change 922827 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/ArticleFeedbackv5@master] Dramatically minimize .svg files

https://gerrit.wikimedia.org/r/922827

Change 922818 merged by jenkins-bot:

[mediawiki/extensions/ArticleFeedbackv5@master] Drop .png fallbacks where an .svg file is present

https://gerrit.wikimedia.org/r/922818

Change 922827 merged by jenkins-bot:

[mediawiki/extensions/ArticleFeedbackv5@master] Dramatically minimize .svg files

https://gerrit.wikimedia.org/r/922827

Change 928533 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/ArticleFeedbackv5@master] Further crush .png and .svg files

https://gerrit.wikimedia.org/r/928533

Change 928538 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/ArticleFeedbackv5@master] Remove all @embed comments from the CSS

https://gerrit.wikimedia.org/r/928538

Change 928815 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/ArticleFeedbackv5@master] Drop a lot of unused images and CSS

https://gerrit.wikimedia.org/r/928815

Change 928538 merged by jenkins-bot:

[mediawiki/extensions/ArticleFeedbackv5@master] Remove all @embed comments from the CSS

https://gerrit.wikimedia.org/r/928538

Change 928533 merged by jenkins-bot:

[mediawiki/extensions/ArticleFeedbackv5@master] Further crush .png and .svg files

https://gerrit.wikimedia.org/r/928533

Change 928815 merged by jenkins-bot:

[mediawiki/extensions/ArticleFeedbackv5@master] Drop a lot of unused images and CSS

https://gerrit.wikimedia.org/r/928815

thiemowmde updated the task description. (Show Details)