flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Flutter IntelliJ leaks memory over time

Open jacob314 opened this issue 3 years ago • 1 comments

Steps to Reproduce

Open Flutter Devtools in Android Studio. Leave an application running in Android Studio over night. Memory usage increases from around 1.4GB for Android Studio debugging a Flutter project to almost 4GB.

On a new run of the project with debugger and devtools enabled. Screen Shot 2021-08-24 at 1 37 46 PM

After running overnight: Screen Shot 2021-08-24 at 1 10 54 PM

This is enough that I tend to need to restart Android Studio about once every day for a mac with 16GB of ram to remain useable. Notice we also appear to be leaking ports. Stopping and starting a Flutter app repeatedly causes the # of ports to climb.

Fyi @kenzieschmoll @terrylucas as this could be an opportunity to do some memory profiling on Android Studio to compare some of the Java profiling tools to DevTools.

Version info

Android Studio 20.20.3.1 Flutter dev channel Flutter Plugin 59.0.2

jacob314 avatar Aug 24 '21 20:08 jacob314

I'm having same issue. I'm using latest macbook pro m1 with 16gb ram but just with AndroidStudio, android emulator, terminal, I reach memory limit and OS asks me to force quit. I had no problem when I was using previous intel macbook 2017 with 16gb ram . It's unclear whether it's OS problem but I have to restart emulator or AndroidStudio every 10 minutes. When I'm asked to force quit application dialog due to memory, AndroidStudio: >4GB, Emulator: >4GB.

I tried developing on my iPhone and only opening AndroidStudio, terminal, I still see force quit application dialog

coldstar96 avatar Jan 12 '22 00:01 coldstar96