Skip to content
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

feat(mobile): minor perf stuff #14264

Merged
merged 1 commit into from
Sep 12, 2024
Merged

feat(mobile): minor perf stuff #14264

merged 1 commit into from
Sep 12, 2024

Conversation

Nodonisko
Copy link
Contributor

Description

This improved performance during discovery for about ~10 FPS on iPhone. Android not measured but could be even better.

Surprisingly main issues was that memoized selector (I start to really dislike proxy-memoize because of too much magic and unpredictable performance)

Related Issue

Resolve

Screenshots:

@Nodonisko Nodonisko requested a review from a team as a code owner September 10, 2024 18:56
@Nodonisko Nodonisko enabled auto-merge (squash) September 10, 2024 19:06
@vytick vytick added the mobile Suite Lite issues and PRs label Sep 10, 2024
// cache up to 3 devices to make sure it works correctly
{ size: 3 },
);
export const selectAccountsByDeviceState = (
Copy link
Contributor

@vytick vytick Sep 10, 2024

Choose a reason for hiding this comment

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

Maybe it is missing memoization, but it feels that switching between home, assets and receive tab takes really long time. In my ios simulator it took around 5 seconds on fully discovered allseed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Now i tried the same on different branch and it also took a long time 🤔. So maybe not related to this change, but still feels very slow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know I will check what's happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's because there is quite a lot of accounts on all seed and there is no FlashList for Accounts/Receive screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not related to any of my changes

@matejkriz
Copy link
Member

I really dislike proxy-memoize for a long time 🙉 It was causing some really unpredictable bugs on desktop. (See #8659, #8700). The idea sounds really cool and smart, but in reality it's too much black magic.

@Nodonisko Nodonisko merged commit b453b84 into develop Sep 12, 2024
84 of 90 checks passed
@Nodonisko Nodonisko deleted the chore/minor-perf-stuff branch September 12, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Suite Lite issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants