Flutter - App Randomly Hangs during launch (is gc causing it?)

Viewed 12

My Flutter app will randomly hang during the launch process, usually on the Splash image.

When checking the Logging feature of DevTools in VSCode, I see this:

gc _spawn • new space collection in 39 ms • 130.5 MB used of 185.0 MB
gc main • new space collection in 39 ms • 130.5 MB used of 185.0 MB
gc _spawn • idle collection in 84 ms ...
gc main • idle collection in 84 ms ...
... splash images created
gc main • idle collection in 85 ms ...
gc main • idle collection in 128 ms ...
flutter.frame 135.9ms ---- Splash image is on screen
// here it hangs and it could be seconds to minutes until it 
// picks back up & I am routed to my home screen

But if it's a quick startup launch, the gc items are not there.

What is the best way to check what is causing those & how to resolve them?

0 Answers
Related