I built an app in flutter which loads data from the server and also fetches it based on the user requests. I've noticed a problem recently. My app is very slower when loading data in release build than debug one. The app almost gets stuck when loading data in release mode but in debug mode, it loads data in less than two seconds. Does anyone have any suggestions on how I can fix this?

I'm running the debug build on an Asus laptop with 12g ram win10 and release on samsung m20 and huawi redmi. The app gets stuck on both of physical devices when loading. I don't know what caused this problem in my app. I tested similar apps and they had an acceptable loading speed in both release and debug builds on these devices.