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

[Performance] Memory and CPU usage issues on idling #22932

Closed
pistou opened this issue Jan 9, 2019 · 2 comments
Closed

[Performance] Memory and CPU usage issues on idling #22932

pistou opened this issue Jan 9, 2019 · 2 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@pistou
Copy link

pistou commented Jan 9, 2019

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Memory: 11.62 GB / 15.90 GB
Binaries:
Yarn: 1.12.3 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD

react 16.6.0
react-native 0.57.4

Description

I'm having some weird issues with the memory and CPU usage, especially when the app is idling ("minimized" in background, not killed).
I'm using Android Studio's profiler and here's what I have:
memory issues
The vertical separator is the moment when I put my app in the background (openning another app like GMail or whatever).

Am I mistaken or the Memory usage should have go down at this point? I'm not sure about this.

What I don't understand is why do I have a peak in CPU usage and power on a regular basis?
Even if it's like 2-6%, it's still more than I would expect, as the App is currently not running?

Any clue on what is going on?

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@dulmandakh
Copy link
Contributor

IIRC, Android apps don't release memory when enters background mode. But you can do it voluntarily using AppState events and release some memory.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants