Skip to content

feat: Disable Blockies icons by default (for performance improvements) #14878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Apr 25, 2025

Description

We noticed during our testing that Blockies account icons take much longer to calculate than equivalent Jazzicons. This change is quite simple, it simply set the default icon type to be jazzicon vs blockies. This is done by setting the deafult value of useBlockieIcon to false. The result is...

  • ~49% decrease in the time to render of the account list

((3.96-2.06)/3.86)*100 = 49.2227979275

This was tested on my Google Pixel 6 in debug mode. I had 18 accounts including one Solana account with balances.

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/919

Manual testing steps

  1. Create a fresh install of the wallet. See the mobile readme for details on how to run the app on your device. I would recommend using a slower android device since the differences are more apparent.
  2. Ensure you are building beta by changing METAMASK_BUILD_TYPE to be beta in your .js.env
  3. yarn setup && yarn watch:clean
  4. create/import a wallet
  5. once onboarded, create a solana account via the prompt on the home page or by clicking on the account list, add new account, solana.
  6. close and reopen the account list, notice that all the icons are Jazzicons

image

  1. The account list should render slightly faster than it did with blockies
  2. go to settings, general and then set your icons to be blockies
  3. navigate back to the home page and open the account selector again
  4. the icons should now be blockies icons

image

  1. the account list should appear slightly slower to render.

Screenshots/Recordings

Before

Screenshot 2025-04-25 at 12 37 28 PM Screenshot 2025-04-25 at 12 29 11 PM

After

Screenshot 2025-04-24 at 9 44 42 PM Screenshot 2025-04-25 at 12 45 06 PM

Confirmed that changing your icons back to blockies works as expected.

screen-20250425-134435.mp4

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@owencraston owencraston force-pushed the feat/default-to-jazzicon branch from 609f99e to ce5bd0c Compare April 25, 2025 19:34
@owencraston owencraston marked this pull request as ready for review April 25, 2025 20:21
@owencraston owencraston requested a review from a team as a code owner April 25, 2025 20:21
@owencraston owencraston force-pushed the feat/default-to-jazzicon branch from 528ff7b to 2e16bd7 Compare April 25, 2025 20:21
@owencraston owencraston added the Run Smoke E2E Requires smoke E2E testing label Apr 25, 2025
Copy link
Contributor

github-actions bot commented Apr 25, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 2e16bd7
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/485f59be-8e72-449b-8041-ed18aacbe117

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@owencraston owencraston added area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. solana-beta labels Apr 25, 2025
Copy link
Contributor

@vinnyhoward vinnyhoward left a comment

Choose a reason for hiding this comment

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

Amazing optimizations lately

@owencraston
Copy link
Contributor Author

@vinnyhoward did you test yourself? I have been getting mixed results and so has @gantunesr ?

@hesterbruikman
Copy link
Contributor

Thank you @owencraston ! Can you confirm that the default setting only affects new users? In spite of the performance improvement (totally understand and agree this is a critical focus area), I want to make sure we don't change the avatar for existing users in one release, and then again two releases later. We're introducing a new avatar altogether.

Any performance gain for new users is a no-brainer, but for existing users I want to make sure we don't change their avatars twice.

@owencraston
Copy link
Contributor Author

@hesterbruikman two things...

  1. we have paused this work since we were not able to determine if it made a meaningful difference in performance.
  2. this would only effect new users, existing users will have their setting of blockies persisted across updates.

@hesterbruikman
Copy link
Contributor

Understood, ty @owencraston !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. Run Smoke E2E Requires smoke E2E testing solana-beta team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants