oblador / react-native-progress

Progress indicators and spinners for React Native
MIT License
3.63k stars 516 forks source link

CircleSnail uses a lot of memory if kept running #227

Open yberstad opened 3 years ago

yberstad commented 3 years ago

Hi!

I see that we sometimes get the following error in production: Out Of Memory: The app was likely terminated by the operating system while in the foreground, unknown file unknown method

While trying to find the source of this error, I see that we have a bug in our app. In some cases it leaves the CircleSnail running, even if the task we are waiting on is done. But when the CircleSnail is continuously running it seems to be "eating" more and more memory.

I have created a demo app to reproduce the behaviour, https://github.com/yberstad/spinnerTest. The demo app just show the CircleSnail, nothing else.

When the app starts it uses around 50 MB, but after around 4 min it uses 1 GB. It also continues to grow even if the app is in the background.

Screenshot 2021-04-21 at 07 24 39

Screenshot 2021-04-21 at 07 23 34

Is this a know issue? Am I'm using CircleSnail wrong?

If I hide the spinner memory stops growing.

Thanks for all the effort you have put into this library, much appreciated 🙂