[C-1322] Android and general performance improvements#2149
Conversation
This reverts commit 0309301.
dylanjeffers
left a comment
There was a problem hiding this comment.
awesome work, stoked to see the improvements in dynamic image and skeleton in particular. big lol that we were Stylesheet.createing 100s of times every page. Notif work is great too
| <TrackItem | ||
| key={track.uid} | ||
| active={playingUid === track.uid} | ||
| uid={track.uid} |
There was a problem hiding this comment.
so the main idea here is that we don't rerender every tile when playinguid changes yeah?
There was a problem hiding this comment.
Yes, this line is specific to the items in the collection tile but the other changes in the pr achieve what you said
| onLoad, | ||
| style | ||
| }: LineupTileArtProps) => { | ||
| const styles = useThemedStyles(createStyles) |
| } | ||
|
|
||
| export const LineupTileCoSign = ({ coSign }: Props) => { | ||
| const trackTileStyles = useThemedStyles(createTrackTileStyles) |
There was a problem hiding this comment.
we should prob look to remove useThemeStyles everywhere at some point
There was a problem hiding this comment.
I'm down, there are a lot of uses though
There was a problem hiding this comment.
yeah the whole sign-up flow could use a perf facelift 🗡️
| const styles = useThemedStyles(createStyles) | ||
| const trackTileStyles = useThemedStyles(createTrackTileStyles) | ||
| const styles = useStyles() | ||
| const trackTileStyles = useTrackTileStyles() |
There was a problem hiding this comment.
this should prob help a ton
| * It's rerendering because bottomTab render function rerenders a lot. | ||
| */ | ||
| export const NowPlayingDrawer = memo(function NowPlayngDrawer( | ||
| export const NowPlayingDrawer = memo(function NowPlayingDrawer( |
| {user && track ? ( | ||
| <> | ||
| <Pressable onPress={onPressTitle}> | ||
| <TouchableOpacity onPress={onPressTitle}> |
There was a problem hiding this comment.
what's the idea here? just better looking ui?
There was a problem hiding this comment.
Yeah it felt weird to have the pressable things with no feedback
| backgroundColor: themeColors.skeleton | ||
| } | ||
| }) | ||
| const useStyles = makeStyles(({ palette }) => ({ |
There was a problem hiding this comment.
wow... we didn't have this for skeleton, lmao rippp
| setShimmerWidth(width) | ||
| setShimmerPos(new Animated.Value(-0.75 * width)) | ||
| shimmerPos.setValue(-0.75 * width) | ||
| shimmer.start() |
There was a problem hiding this comment.
smart so does this prevent a rerender or just speed up when we start to shimmer?
There was a problem hiding this comment.
Prevents a render bc we aren't setting width in state
| getNotificationEntity(state, notification) | ||
| const entity = useProxySelector( | ||
| (state) => getNotificationEntity(state, notification), | ||
| [notification] |
There was a problem hiding this comment.
so it is the case that "notification" object is stable?
There was a problem hiding this comment.
I believe so, this is how the other notif types are doing it
| yield put(queueActions.pause({})) | ||
| } | ||
|
|
||
| function* togglePlay(lineupActions, lineupSelector, prefix, action) { |
There was a problem hiding this comment.
this makes sense to me
There was a problem hiding this comment.
@sliptype lol rip i was doing the exact same thing in my branch 💀. but the good news is we both thought this was a good idea
There was a problem hiding this comment.
Oh noooo, sorry I should have communicated that
|
Preview this change https://demo.audius.co/sk-android-perf |
|
Preview this change https://demo.audius.co/sk-android-perf |
[5cd5d68] [C-1322] Android and general performance improvements (#2149) Sebastian Klingler [f6ef033] [C-1341] Add notifications bottom tab screen (#2148) Dylan Jeffers [9ddfe72] [C-1335] Upgrade and share typescript version (#2145) Dylan Jeffers [b701102] [C-1336] Implement account drawer (#2146) Dylan Jeffers [8587b3f] Add structured data and update head (#2131) Joseph Lee [40ef3b7] [C-1317] Improve client startup tooling (#2140) Raymond Jacobson [e09c6f9] Update new tables to allow drag to add to playlist (#2134) Kyle Shanks [4633581] Bump ios (#2144) Sebastian Klingler [f331426] Slow down $AUDIO page Stripe/Coinbase button animation speed (#2143) Marcus Pasell [44916a5] [C-1291] Add base layout for navbar overhaul (#2139) Dylan Jeffers [e85955c] Prepend audius url to share url (#2142) Sebastian Klingler [068917e] Use Hermes for Android app C-1329 (#2130) nicoback2 [98f845c] [C-1327] Fix deep linking for tracks with diacritics (#2137) Sebastian Klingler [0ec460f] [PAY-685] Update Stripe button to use approved brand assets (#2138) Marcus Pasell [1b1a377] Refactor bottom-tab-bar (#2136) Dylan Jeffers [9dbb11e] fix play bar buttons target (#2135) nicoback2 [9daba05] [C-1303][C-1304] Fix misc. profile layout issues (#2129) Raymond Jacobson [04eb0c9] [C-1272] Fix Search UI jank (#2133) Sebastian Klingler [feaa6f0] Bump react-screens to 3.17.0 to avoid crash on android (#2132) Sebastian Klingler [db996e8] Remove old table components and rename new table components (#2126) Kyle Shanks [92a2c7e] [C-1319] Fix native profile collectibles (#2127) Dylan Jeffers [7a83f29] [C-1282] Remove followUser social action in profile reducer (#2121) Dylan Jeffers [26de098] [C-1309] Fix playlists/collectibles not loading (#2125) Dylan Jeffers [78dee89] Fix getState undefined when opening reopening app on android (#2123) Sebastian Klingler [ef69b70] [C-1318] Revert "[C-1184] Fetch lineups after coming back online (#2083)" (#2122) Andrew Mendelsohn [42efd1b] [PAY-457] Add Geofilter for Coinbase, Stripe (#2118) Marcus Pasell [e413d9a] Bring back unhealthySlotDiffPlays (#2119) Dylan Jeffers [fb96ea4] Fix favorites page filtering on old tables (#2120) Kyle Shanks [cf73f53] Fix android build (#2113) Sebastian Klingler [ebaa5d8] [C-1040] Remove extraneous mobile logs (#2107) Dylan Jeffers [bc7e7b0] bump libs in web and common (#2117) nicoback2 [dc16dcb] bump libs 1.0.12 (#2116) nicoback2 [c737535] Undo change to prevent cache update when no collectibles (#2114) Sebastian Klingler [b2764ba] Keep screen awake when confirming tip (#2103) nicoback2 [4b39ec1] fix pw clipping on mobile (#2102) nicoback2
Description
Sorry for the big pr 😅
useProxySelectorfor all notifications to prevent rerenders when navigatingonLayoutcallbackDynamicImagererenders by memoizing styles that are passed in and only using a single onLayout callback to set the size for both images@dylanjeffers I reverted the navigation changes for now and will address in next pr because I was seeing the double navigation problem. Will try to use getNavigator to fix that
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.
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.