-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Hi!
We're developing selfscanning applications for the retail market. On one of the devices our customers are using Zebra/Symbol MC18 our Flutter app is unresponsive and lagging like crazy. After investigating the issue, we come to the conclusion, that it's not an issue in our app. Our native apps do not suffer from this issue and are running without any hiccups.
Luckily we were able to easily reproduce this issue in the default counter-project and were able to spot a very strange pattern. Through flutter driver the button is clicked for 1000 times and after each tap the time it took was printed.
Repo: https://github.com/mark-revision/flutter_MC18N0_issue
Start test: flutter drive --target=test_driver/app.dart
On all other devices the time between taps is between 220 - 320ms depending on the device during these 1000 taps.
On the MC18N0 we're seeing a different pattern
The first 11 taps are always slow and sluggish and every tap takes 2000 ms or sometimes 4000 ms
Then after 11 taps, every 10th tap takes around 2000 ms and the taps in between 250-300 ms
Then after 200 taps, every tap takes between 250-300 ms. This is after 2 minutes.
Resulting in the response graph below:

The behaviour makes even the simple counter app unusable. On our own app, the lag spikes stay after 2 minutes. Googling around it seems to be a bug related to the PowerVR SGX 540 GPU that is used in this device.CPU is OMAP4430 ARM-v7A 32-bit.
Related tickets with similar PowerVR SGX 540 issues:
31746
14036
11794
Issue is present both in debug and in release builds.
Our customers have thousands of these devices that run native Android and Xamarin apps perfectly, so this bug seems to be related to Flutter. Maybe it's possible to workaround this problem? Any help is appreciated.
Best regards,
Mark
[edit]
When replacing the floating action button press with a gesture recognizer updating the state (to eliminate the Inkwell-animation), you'll see that the lag spikes are there too, the taps are registered, but the screen is not being updated when the state has changed.
in this video