Code Monkey home page Code Monkey logo

Comments (7)

shane-tomlinson avatar shane-tomlinson commented on May 31, 2024

I see, a call to /v1/profile on the profile server calls /v1/avatar. The initial avatar load takes 5+ seconds, then a second fetch occurs for just the avatar data, adding 5 more seconds.

This is sub-optimal. The profile data fetch done in settings.js->beforeRender already returns the avatar data, the call to /v1/avatar from account.fetchCurrentProfileImage in settings.js->afterVisible fetches no new information and only is only used to fetch the avatar id and slows down the perceived load time.

I wonder if we can speed this up using two approaches:

  1. Ditch the redundant call to /v1/avatar
  2. Call account.fetchProfile() in afterVisible

The first seems relatively safe, the second I'm unsure of the repercussions.

cc @zaach, @jstrutz

from fxa.

shane-tomlinson avatar shane-tomlinson commented on May 31, 2024

Ref #2980

from fxa.

shane-tomlinson avatar shane-tomlinson commented on May 31, 2024

This is a partial dup of #2980.

from fxa.

shane-tomlinson avatar shane-tomlinson commented on May 31, 2024

More info - the call to /v1/avatar may be done because /v1/profile only returns the avatar URL and not the avatar ID. The avatar ID I believe is necessary to delete the avatar, but loading /settings/avatar/change fetches the avatar again anyways, which will get the ID.

The call to /v1/profile could return the avatar id to eliminate the necessity of fetching the avatar information again when hitting /settings/avatar/change.

from fxa.

vladikoff avatar vladikoff commented on May 31, 2024

👍 to fix this, speed boost for functional tests :)

from fxa.

vladikoff avatar vladikoff commented on May 31, 2024

from mtg: the new spinner might make this experience better

from fxa.

clouserw avatar clouserw commented on May 31, 2024

We tested this in triage and I think it is fixed. A full refresh will show the settings page immediately with a blank avatar, and then the avatar is shown (after it downloads, presumably).

from fxa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.