Improve friend list loading speed #567

Closed
opened 2026-04-05 16:21:13 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Map1en on 2/2/2025

  1. This change improves the loading speed of the friend list when opening VRCX, making it show up much faster.

  2. The speed at which the app loads the friend list is crucial for user experience. Currently, the loading time feels slow.

  3. In the LOGIN event, the friend list loading process was blocking other operations.

    • I found that three methods refreshNotifications, loadCurrentUserGroups, and getCurrentUserGroups were slow, with loadCurrentUserGroups taking more than 2s.

    • These methods seemed not necessary for the initial screen rendering and can be executed later, so I made them run asynchronously by removing the await.

    • I also checked the logic within loadCurrentUserGroups and decided that the async rewriting wasn't necessary, but I left it as is since it didn't seem to impact the following steps.

      • If don't change the await in app.js, just by rewriting loadCurrentUserGroups, can still reduce the loading time by over 1s.
  4. I tested the changes, and the time from API.$on('LOGIN') (Line 5536) to just before getFriendLog (Line 5565) was reduced from around 3.5s to 0.6s in dev mode, almost instantly.

  5. I wasn't able to fully analyze all related logic, as it's quite extensive, but the current changes don't seem to cause issues. More testing may be needed.

*Originally created by @Map1en on 2/2/2025* 1. This change improves the loading speed of the friend list when opening VRCX, making it show up much faster. 2. The speed at which the app loads the friend list is crucial for user experience. Currently, the loading time feels slow. 3. In the LOGIN event, the friend list loading process was blocking other operations. - I found that three methods `refreshNotifications`, `loadCurrentUserGroups`, and `getCurrentUserGroups` were slow, with `loadCurrentUserGroups` taking more than 2s. - These methods seemed not necessary for the initial screen rendering and can be executed later, so I made them run asynchronously by removing the await. - I also checked the logic within `loadCurrentUserGroups` and decided that the async rewriting wasn't necessary, but I left it as is since it didn't seem to impact the following steps. - If don't change the await in `app.js`, just by rewriting `loadCurrentUserGroups`, can still reduce the loading time by over 1s. 4. I tested the changes, and the time from API.$on('LOGIN') _(Line 5536)_ to just before `getFriendLog` _(Line 5565)_ was reduced from around 3.5s to 0.6s in dev mode, almost instantly. 5. I wasn't able to fully analyze all related logic, as it's quite extensive, but the current changes don't seem to cause issues. More testing may be needed.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/VRCX#567