Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

[C-1624] Fix eager load #2352

Merged
merged 1 commit into from
Dec 6, 2022
Merged

[C-1624] Fix eager load #2352

merged 1 commit into from
Dec 6, 2022

Conversation

raymondjacobson
Copy link
Member

@raymondjacobson raymondjacobson commented Dec 6, 2022

Description

Fix eager load so that feed/trending/whatever loads quickly on your first app open
This change is big, but not that scary. It does 3 things:

  • Rename waitForAccountAndBackend to be waitForWrite -- you need this to write data
  • Add a new waitForAccountAndReachability (no backend) and calls it waitForRead -- you need this to read data
  • Changes web3.utils.sha3 to use a (tiny 3kb gzip) js-sha3 library to not block on libs init for trending/track ranks
RPReplay_Final1670302925.MP4

Dragons

Is there anything the reviewer should be on the lookout for? Are there any dangerous changes?

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.

Release build on phone, tested offline mode usual behaviors as well.

How will this change be monitored?

For features that are critical or could fail silently please describe the monitoring/alerting being added.

Feature Flags

Are all new features properly feature flagged? Describe added feature flags.

@raymondjacobson
Copy link
Member Author

The visual stutter in the images fading in in the lineup drives me crazy.... maybe something can be done there next

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/rj-c-1624

@dylanjeffers
Copy link
Contributor

dylanjeffers commented Dec 6, 2022

The visual stutter in the images fading in in the lineup drives me crazy.... maybe something can be done there next

funny you mention this, i was looking into that! i think its due to the crazy number of saga calls that get triggered as a follow on to a lineup coming back. and on top of that, tons of animations for the images to come in, which is probably overkill. maybe we only do the anims for the first x number of lineup items, maybe we make them faster, or just remove them. also we should look into all the extra calls/action that happens post lineup coming back and see if we can simplify there

@sliptype
Copy link
Contributor

sliptype commented Dec 6, 2022

The visual stutter in the images fading in in the lineup drives me crazy.... maybe something can be done there next

funny you mention this, i was looking into that! i think its due to the crazy number of saga calls that get triggered as a follow on to a lineup coming back. and on top of that, tons of animations for the images to come in, which is probably overkill. maybe we only do the anims for the first x number of lineup items, maybe we make them faster, or just remove them. also we should look into all the extra calls/action that happens post lineup coming back and see if we can simplify there

Lol I was also thinking about this! So on lineups we animate both the tile content and the image itself, which could be what is causing the stuttering. Since we wait until the image is loaded to fade in the tile content, we could probably disable the image animation altogether in lineups

Copy link
Contributor

@sliptype sliptype left a comment

Choose a reason for hiding this comment

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

omg I love it! Looks much faster and the helpers are easier to understand. Also crazy that this required no changes in the mobile directory at all

@raymondjacobson raymondjacobson merged commit 080bf84 into main Dec 6, 2022
@raymondjacobson raymondjacobson deleted the rj-c-1624 branch December 6, 2022 18:26
@@ -337,15 +337,15 @@ function* associateInstagramAccount(action) {
}

function* fetchSavedAlbumsAsync() {
yield waitForBackendAndAccount()
yield waitForRead()
Copy link
Contributor

Choose a reason for hiding this comment

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

so much cleaner naming

raymondjacobson added a commit that referenced this pull request Dec 7, 2022
audius-infra pushed a commit that referenced this pull request Dec 10, 2022
[9a78b12] Expose SDK in client (#2368) Reed
[b6bf15b] [C-1649] Reset libs on app start (#2374) Sebastian Klingler
[a27f0f5] [C-1651] Update mobile connect-wallet ui (#2375) Dylan Jeffers
[8ca59ba] [C-1650] Finalize solana-phone integration (#2366) Raymond Jacobson
[576231d] lint feature enabled (#2373) Isaac Solo
[b966fe3] [C-1563] Fetch and download all paginated track favorites (#2363) Andrew Mendelsohn
[17c9248] Make default Table isEmptyRow (#2370) Reed
[f90a081] Remove optimizely social feature for EM (#2371) Isaac Solo
[8826421] [C-1628] Add metamask/rainbow mobile wallet-connect (#2365) Dylan Jeffers
[7eaad19] [Share to IG] C-1637 C-1636 C-1635 QA - make text static size, make sticker static colors, align icon (#2364) nicoback2
[1373b30] Remove getTrackListens endpoint from audiusBackend (#2169) sabrina-kiam
[1f6973f] Queue optimizations; batch action for tracks (#2362) Andrew Mendelsohn
[533e57c] C-1606 C-1609 C-1610 Share to IG Story QA (#2359) nicoback2
[32cea4b] Fix (#2361) Michael Piazza
[36a9755] [PAY-753][PAY-754] Ensure > 1 $AUDIO quoted before trying recovery (#2355) Marcus Pasell
[06b7d0f] [C-1632] Queue tracks in favorited collections (#2357) Andrew Mendelsohn
[c4117e5] [C-1633] Chunk track fetching for large playlists (#2358) Dylan Jeffers
[9831e94] Update mobile upload for final release (#2350) Dylan Jeffers
[98a3dc1] Add clear timeout (#2356) Raymond Jacobson
[e328a52] [C-1595] Fix sign out (#2351) Raymond Jacobson
[073f890] [PAY-739] Add view transactions button in Audio page (#2332) Reed
[0efca5b] Fetch and store ablum art for oflfine downloads (#2317) Andrew Mendelsohn
[cfdece2] [C-1626] Connect phantom wallet-connect with common sagas (#2353) Dylan Jeffers
[ecb33cb] [C-1596] Fix android mobile-upload bugs (#2354) Dylan Jeffers
[080bf84] [C-1624] Fix eager load (#2352) Raymond Jacobson
[552497f] [C-1557] Add TikTok to CompleteProfileWithSocial on desktop (#2341) Sebastian Klingler
[228b20e] fix crash share to ig (#2349) nicoback2
[a88e3f9] [C-1615] Fix android fullscreen modals (#2348) Dylan Jeffers
[86a7c6e] Update TrackListItem styles to reduce the width of the artist name (#2347) Kyle Shanks
[cb54bf4] update audius icon (#2345) nicoback2
[e7294dc] [C-1614] Move creativeCommons to common (#2346) Dylan Jeffers
[f475daa] share to ig events (#2344) nicoback2
[5ddeadc] [C-1675][C-1555] Implement wallet-connect and wallet-adapter-protocol (#2343) Raymond Jacobson
[b4688f2] Add loading screen w/ cancel function to Share to IG (#2342) nicoback2
@AudiusProject AudiusProject deleted a comment from linear bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants