Skip to content

Performance: Delivery optimized images#7176

Merged
Gudahtt merged 5 commits intoMetaMask:developfrom
sergejmueller:optimized-images
Sep 17, 2019
Merged

Performance: Delivery optimized images#7176
Gudahtt merged 5 commits intoMetaMask:developfrom
sergejmueller:optimized-images

Conversation

@sergejmueller
Copy link
Copy Markdown
Contributor

@sergejmueller sergejmueller commented Sep 17, 2019

The objective is to optimize MetaMask images. The following measures have been taken:

  • Added gulp-imagemin package
  • Added optimize:images Gulp task
  • Added optimize:images task to the existing build tasks
  • Optimization of existing images.

Pro
The overall size reduced by 25%.

Contra
The build execution time is increasing.

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks promising! It looks like you forgot to update the lockfile - that's why CI is failing.

Could you update the SVG images to preserve the indentation? Committing the "optimized" SVGs seems like a good idea generally apart from any optimizations that impede readability (e.g. the indentation). Maybe this would be most easily accomplished by using npx svgo --pretty (it looks like svgo is the underlying tool used to optimize the SVG images).

@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Sep 17, 2019

It looks like the lockfile has changed dramatically - way more than required for the dependency you added. I'm guessing you installed using npm first, before installing with yarn? I'd recommend following these steps:

  • Undo the changes you've made to the lockfile (e.g. git checkout origin/develop -- yarn.lock)
  • Delete node_modules
  • Run yarn again

That should result in an updated lockfile with minimal changes. I suspect one of these changes is behind these strange CI errors.

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good now, thanks!

@Gudahtt Gudahtt merged commit ef7d019 into MetaMask:develop Sep 17, 2019
Gudahtt added a commit that referenced this pull request Sep 17, 2019
…evelop

* origin/develop: (31 commits)
  Performance: Delivery optimized images (#7176)
  Add `appName` message to each locale
  Remove the disk store (#7170)
  Update @hapi/subtext as per security advisory (#7172)
  Add fixes for German translations (#7168)
  Fix recipient field of approve screen (#7171)
  3box integration 2.0 (#6972)
  ci - metamaskbot - include links to dep-viz and all artifacts (#7155)
  Replace `undefined` selectedAddress with `null` (#7161)
  Add polyfill for AbortController (#7157)
  Remove redundant error logging (#7158)
  Set minimum Firefox version to v56.2 to support Waterfox (#7156)
  ci - install deps with "--har" flag to capture network activity (#7143)
  ci - create source-map-explorer build-artifacts (#7141)
  ci - build-artifacts - generate sesify-viz for inspecting deps (#7151)
  Publish GitHub release from master branch (#7136)
  fix rinkeby spelling (#7148)
  deps - move gulp-terser-js to devDeps
  test:integration - fix renamed test data file
  lint fix
  ...
@sergejmueller sergejmueller deleted the optimized-images branch September 18, 2019 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants