aves icon indicating copy to clipboard operation
aves copied to clipboard

App runs slowly starting from 1.12.6

Open kmcbest opened this issue 1 year ago • 42 comments

Describe the bug After updating and cataloguing on the new version, the APP still runs slowly

  • the response time is longer
  • with intermittent "app isn't responding" pop-ups
  • and the tagging interface is not snappy anymore

To Reproduce Steps to reproduce the behavior:

  1. Update to 1.12.6, launch and wait for the APP to rebuild DB
  2. Put the APP on idle, and the "app isn't responding" keeps popping up, see video 1
  3. Try to tag an image, when the tagging interface is show, the screen keyboard takes a lot of time to swipe up and down (it used to do so in a fraction of a second), see video 2

Expected behavior The App should run smoothly without pop-ups and the tagging interface should behave like before version 1.12.4

Screenshots I've send two screen recording videos to [email protected] as they are sensitive

System information and logs: Package: deckers.thibault.aves Installer: com.miui.packageinstaller Aves version: 1.12.6-play, build 146 Flutter: stable 3.29.1 Android version: 15, API 35 Android build: AP3A.240617.008 Device: Xiaomi 23078RKD5C Display: pixel ratio=3.0, logical=406.6666666666667x904.0, physical=1220.0x2712.0 Support: dynamic colors=true, geocoder=true, HDR=true, wide gamut=true Mobile services: not available Connectivity: wifi System locales: zh_CN Storage volumes: /storage/emulated/0/ Storage grants: /storage/emulated/0/Download/sports/, /storage/emulated/0/skdir/, /storage/emulated/0/Movies/, /storage/emulated/0/Download/Infinity/, /storage/emulated/0/Pictures/, /storage/emulated/0/DCIM/, /storage/emulated/0/Download/Boorusphere/, /storage/emulated/0/Tencent/, /storage/emulated/0/IDMP/, /storage/emulated/0/download/Infinity/, /storage/emulated/0/#Comics/, /storage/emulated/0/SYNC/, /storage/emulated/0/Download/Hershuar/, /storage/emulated/0/APPS/, /storage/emulated/0/Download/壁纸/, /storage/emulated/0/Download/Japanese/, /storage/emulated/0/Download/clips/, /storage/emulated/0/Download/pixiv_pick/, /storage/emulated/0/tencent/, /storage/emulated/0/baidunetdisk/, /storage/emulated/0/Download/TeraBox/, /storage/emulated/0/Download/QQ/ Error reporting: true

app log: see attachment

aves-logs-20250311_171928.txt

Additional context Add any other context about the problem here.

kmcbest avatar Mar 11 '25 09:03 kmcbest

Do you experience the same issue if you try the Izzy or Libre versions of Aves? These versions do not bundle precomputed shaders, and I see some shader related warnings in your logs.

deckerst avatar Mar 11 '25 14:03 deckerst

That would require a lot of (un)installations. I'm not sure if the backup/restore feature can be used without setting/preference loss. Since I've always used the play release, the latest update is probably the main reason.

kmcbest avatar Mar 11 '25 14:03 kmcbest

The libre has a different app id, so you could install it side by side with the play version.

deckerst avatar Mar 11 '25 14:03 deckerst

I tried the Libre version but didn't see significant improvement. It has the 'not responding' popups all the time during the cataloguing process. After the cataloguing done it can still show from time to time. And the tagging interface is a bit faster yet still very slow compared to older version.

kmcbest avatar Mar 11 '25 15:03 kmcbest

I uninstalled and reverted to Play release 1.12.3 with settings restored. The's no 'not responding' popups during the cataloguing.

kmcbest avatar Mar 11 '25 15:03 kmcbest

Could you please try this build and let me know how it goes? It will install as a separate app named "Aves [Profile]".

deckerst avatar Mar 11 '25 18:03 deckerst

Tested. Everything is back to normal with this profile build. No "not responding" pop-ups anymore and tagging interface snappy again.👍

kmcbest avatar Mar 12 '25 01:03 kmcbest

Thanks for following up.

It's a good news / bad news situation. The version you tested has the latest code for the app itself (which is reassuring), but with the previous version of the framework I'm using, Flutter. So it seems your device has a compatibility issue with the latest stable version of Flutter, v3.29.1.

deckerst avatar Mar 12 '25 07:03 deckerst

Thanks. Can the issue be isolated for reporting to Flutter team? But I understand it can be troublesome since it only affects a certain device/manufacturer. I'll keep the profile version now and wait for the next Play version when Flutter updates itself again.

kmcbest avatar Mar 12 '25 07:03 kmcbest

If you're willing, you could try another thing: use one of the sluggish versions, but disable the blurring via Settings > Display > Blur effect.

deckerst avatar Mar 12 '25 08:03 deckerst

If you're willing, you could try another thing: use one of the sluggish versions, but disable the blurring via Settings > Display > Blur effect.

that fixed my performance issues! Basically, the app would first run slow, and then would just crash randomly, I'm pretty sure it was basically using up most of my memory on my phone witch made it run terribly, Granted I have over 10k photos with some videos and gifs (don't ask why I have so much) you should put a warning about how it could impact performance on low end or mid range devices

Fuoxden avatar Mar 12 '25 08:03 Fuoxden

@Fuoxden there is a basic performance cost with blurring, but here OP experienced some serious hanging which could, or could not, be due to blurring with the latest version of Flutter. The latest version of Aves also decodes images in a different way, possibly needing more RAM. In other words, there could be various reasons for your experience.

deckerst avatar Mar 12 '25 09:03 deckerst

@deckerst You guess is right. I've updated my Play version back to 1.12.6 and disabling blurring does not fix the lagging problem. My phone has MediaTek Dimensity 9200+ and 24GB of RAM.

kmcbest avatar Mar 12 '25 09:03 kmcbest

I saw 1.12.7 has a new Flutter version. But the problem is still the same after updating. Just FYI.

kmcbest avatar Mar 21 '25 01:03 kmcbest

@kmcbest Could you please try this build? It uses a different rendering engine, so I wonder whether it would make a difference on your device.

deckerst avatar Mar 26 '25 17:03 deckerst

@kmcbest Could you please try this build? It uses a different rendering engine, so I wonder whether it would make a difference on your device.

Could you please use another app name so that I can keep using the working profiler version. Thank you.

kmcbest avatar Mar 27 '25 01:03 kmcbest

Here's a profile build of the libre flavour: https://drive.google.com/file/d/1aO-PLSbDaoF7FpEbwEqQq0vfU_YDqYdt/view?usp=sharing

~~Same app display name~~ Named "Aves Libre [Profile]", using a different app ID, so it shouldn't clash with the one you already have.

deckerst avatar Mar 27 '25 07:03 deckerst

I do not have Xiaomi devices. I do not have problem with app hangs etc. but since v1.12.7 or v1.12.6, the app runs significantly slower. On my high-end Vivo phone it's not very noticeable. But on my Lenovo tablet that's a couple years old, the difference is noticeable immediately after update. The app UI draws laggy/choppy and entire app feels laggy and slower. I disabled blurring, it helps with laggy UI draw a bit but does not eliminate the lags completely.

muchqs avatar Mar 27 '25 07:03 muchqs

@muchqs could you please try on your tablet the test build from my previous comment and let me know how it goes?

For OP there's an issue with the version of the framework I'm using, but I've also introduced other changes in v1.12.4, so what you experience could be a different issue from the one here.

deckerst avatar Mar 27 '25 08:03 deckerst

Here's a profile build of the libre flavour: https://drive.google.com/file/d/1aO-PLSbDaoF7FpEbwEqQq0vfU_YDqYdt/view?usp=sharing

~Same app display name~ Named "Aves Libre [Profile]", using a different app ID, so it shouldn't clash with the one you already have. Thanks, yet it didn't work, showing the same symptoms as before.

kmcbest avatar Mar 27 '25 09:03 kmcbest

I updated the app today to 1.12.10 from 1.12.4 or .3 if I remember correctly and it lags like crazy now. I am on samsung A71, android 13, stock android. Disabling blur fixes the issue

dgudim avatar Apr 22 '25 14:04 dgudim

@dgudim the previous version of Aves you were using (v1.12.4 or .3) was not lagging even with blur enabled?

Could you please try this test build and let me know whether it lags for you when blur is enabled?

deckerst avatar Apr 22 '25 17:04 deckerst

@deckerst It wasn't, yeah. And this build isn't laggy either

dgudim avatar Apr 22 '25 17:04 dgudim

If you'll indulge me, here's another test build. This one uses the latest framework version (like Aves v1.12.10) but I removed a recently introduced advanced blur technique. Maybe that's specifically this blur technique that doesn't work well on your device.

deckerst avatar Apr 22 '25 18:04 deckerst

Hmmm, this one lags as well. If you want, I can try profiling the app in android studio or with flutter tooling if they have a profiler

dgudim avatar Apr 22 '25 18:04 dgudim

To recap:

  1. Aves v1.12.10 (flutter v3.29.3, Impeller w/o AHB swapchains, w/ backdrop grouping) w/ blur: lags
  2. Aves v1.12.10 (flutter v3.29.3, Impeller w/o AHB swapchains, w/ backdrop grouping) w/o blur: fine
  3. test build 1 (flutter v3.27.4, Impeller w/ AHB swapchains, w/o backdrop grouping) w/ blur: fine
  4. test build 2 (flutter v3.29.3, Impeller w/o AHB swapchains, w/o backdrop grouping) w/ blur: lags

Tests 3) & 4) suggest that my code is fine but that latest flutter v3.29.3 is problematic on your device (like OP). But the fact that disabling blur in 2) works for you (which did not help for OP) suggests it's just a general performance issue, even though performance was ok on your device in 3). So I'm confused.

I've seen from OP screen recordings that the app was hanging (with OS popups asking whether to kill/wait), and that even bringing up the keyboard was very choppy (for example, when typing text in the tag editor). Do you experience that kind of lag? Maybe a screen recording and logs (from About > Bug Report) would help.

deckerst avatar Apr 22 '25 18:04 deckerst

My lag feels like the app is running at 20 fps, I already tried recording, but it's not visible there, looks like the recording is capped at 30fps. But here are the logs

dgudim avatar Apr 22 '25 20:04 dgudim

Thanks. I assume:

  • 3.txt for Aves v1.12.3 (flutter v3.27.4, Skia, w/o backdrop grouping)
  • 10.txt for Aves v1.12.10 (flutter v3.29.3, Impeller w/o AHB swapchains, w/ backdrop grouping)
  • profile1.txt for test build 1 (flutter v3.27.4, Impeller w/ AHB swapchains, w/o backdrop grouping)
  • profile2.txt for test build 2 (flutter v3.29.3, Impeller w/o AHB swapchains, w/o backdrop grouping)

I see the following issue block in 10.txt and profile2.txt (but not in 3.txt nor profile1.txt):

E qdgralloc: GetGpuPixelFormat: No map for format: 0x38
E AdrenoUtils: <validate_memory_layout_input_parmas:1962>: Unknown Format 0
E AdrenoUtils: <adreno_init_memory_layout:4689>: Memory Layout input parameter validation failed!
E qdgralloc: GetGpuResourceSizeAndDimensions Graphics metadata init failed
E Gralloc4: isSupported(1, 1, 56, 1, ...) failed with 1
E GraphicBufferAllocator: Failed to allocate (4 x 4) layerCount 1 format 56 usage b00: 1
E AHardwareBuffer: GraphicBuffer(w=4, h=4, lc=1) failed (Unknown error -1), handle=0x0

deckerst avatar Apr 22 '25 20:04 deckerst

Yeah, I can also reinstall the first profile you sent me if that will help

dgudim avatar Apr 22 '25 20:04 dgudim