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

High CPU usage / low FPS #14

Open
olessavluk opened this issue Mar 4, 2024 · 7 comments
Open

High CPU usage / low FPS #14

olessavluk opened this issue Mar 4, 2024 · 7 comments

Comments

@olessavluk
Copy link

olessavluk commented Mar 4, 2024

Hey,

I've noticed significant lag when scrolling over list of banks:

CPU/threads/FPS chart

Screen Shot 2024-03-04 at 15 34 48

Video with visible lag (see how long it takes for images to render)
file.mp4

Do you know what could be causing this? Noticed images are "blinking" during the scroll maybe there too much encoding/resizing happening on every element instead of once?

@olessavluk olessavluk changed the title High cpu usage / low FPS High CPU usage / low FPS Mar 4, 2024
@tl-keenen-charles
Copy link
Contributor

Hey Oles, I haven't seen this issue before. You're using the react native sdk right? Could you also share what device (or emulator) and OS version you're testing on?

@olessavluk
Copy link
Author

yeah, latest react native sdk

I've tried multiple device, seems like all of them have same issue:

  • pixel 4
  • pixel 4a
  • samsung galaxy a50

it's also mostly visible on first swipe, later in 5-10s becoming faster

@tl-keenen-charles
Copy link
Contributor

Thanks for the info! We have been able to reproduce it now. Will look into this and get it fixed it in a future release.

@tl-keenen-charles
Copy link
Contributor

Hey, I've looked into this issue and it seems to occur when running the SDK in debug mode on Android due to some overhead that affects the performance of lazy layouts. The issue should go away when you run the app in release or profileable mode.

@olessavluk
Copy link
Author

olessavluk commented Mar 25, 2024

Just tried running release build made via yarn react-native run-android --mode release seems to be same. Also used DemoApp from RN package to make sure there are no interference with my app.

CPU/threads/FPS chart

Screen Shot 2024-03-25 at 17 15 35

Video with freezes at the start of scroll
file.mp4

Device used: Galaxy A50 (which is considered median peformance wise)

Compared with Gmail app - FPS also drops to ~40, but scroll is smooth all the time despite much larger list. So it's not that significant as I thought, but still feels too much for such a small list

CPU/threads/FPS chart when scrolling/navigating Gmail app

Screen Shot 2024-03-25 at 18 15 23

@tl-keenen-charles
Copy link
Contributor

Can you share which tool you're using to monitor performance?

@olessavluk
Copy link
Author

I was using https://docs.flashlight.dev/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants