Ui Lag (thread blocking?) if run with 'Start Debugging', check internet need 10 seconds to run in 2.5.1 + Flutter 3.24.0
Hello!
I updated to flutter 3.24.0 and tried to run in debug, and I noticed that is impossible to use the app in debug mode, once I check for internet conection the app freeze until it complete the check.
I have this code running inside a Isolate
Future<bool> hasInternetConnection() async {
print('Iniciando verificação');
Stopwatch stopwatch = Stopwatch()..start();
bool result = await InternetConnection().hasInternetAccess;
print('doSomething() executed in ${stopwatch.elapsed}');
print('Verificação concluida: ${result}');
return result;
}
If I run the app with "Run Without Debugging" (there is no lag in UI) the output is I/flutter (19273): Iniciando verificação I/flutter (19273): doSomething() executed in 0:00:00.700884 I/flutter (19273): Verificação concluida: true
If I run the app with "Start Debugging" there is a lot of UI lag (freezing) and the output is I/flutter (23919): Iniciando verificação I/flutter (23919): doSomething() executed in 0:00:10.162930 I/flutter (23919): Verificação concluida: true
It doesnt happens if I try to downgrade to flutter 3.22.3, it works very well without any lag or freezing.
Its happening only with me? What is going on?
Well its weird, minutes later the problem didnt happens anymore, I really dont know why.
I noticed a error in console talking something about pageSize couldnt allocate something (sorry I lost the error message once I restarted the app)
I'm thinking now its something related to the flutter version 3.24.0 but I dont have sufficient information about it...
I will continue to check if it will happens again, and if I can reproduce the issue again I get in touch. Did it happened with someone else?
Did it happened with someone else?
Something similar is mentioned in #54, but the person reporting the problem was using a really old version of the package. So cannot say for sure what's happening.
Something similar is mentioned in #54, but the person reporting the problem was using a really old version of the package. So cannot say for sure what's happening.
Thank you. I dont think its a problem with this package, maybe its with flutter and specifc devices(mine is Redmi Note 10S), or something else.
If it doesnt happens again in 1 week, I will close the issue because I cant reproduce it anymore.