Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all kinds of switching between apps (home button, square button) lag a lot and sometimes glitch after update from 2.0.0 to 2.1.1 #220

Open
ewnjtgouierg opened this issue Feb 8, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@ewnjtgouierg
Copy link

ewnjtgouierg commented Feb 8, 2024

since the upgrade to 2.1.1 (the latest F-Droid version at the moment)

the home button (the disc that brings back the unlauncher) and other buttons of that menu lag a lot
testing it and comparing to 2.0.0 - it adds some delay before the switch starts right away (no matter if it's with animation or w/o thanks to "Remove animations" setting - smartphone pauses before it even begins)

this lag varies and seems to grow over time, the delay can reach many seconds (until I realized that, I thought that tap is just ignored and would tap again and again), making smartphone partially unresponsive at some point

also sometimes there're glitches, like:

  • instead of just fade, it goes back to unlauncher with some slide transition (completely unrelevant and confusing)
  • white bg is displayed before the switch (i use the midnight theme)
  • after tapping an app name in the shortlist, instead of this app getting launched, the notifications screen is opened (the one that you can get to by swiping from the top)

downgrading to 2.0.0 completely solves all these problems but it's kind of sad because 2.1.1 has the long awaited fix of the full-width tap area of every option in the menu! other great improvements too, but that one is what is difficult to give away

@jkuester jkuester added the bug Something isn't working label Feb 8, 2024
@jkuester
Copy link
Owner

jkuester commented Feb 8, 2024

Yikes! This is disappointing! Can I ask a few more clarifying questions to hopefully aid with re-creation and fixing this issue?

  • What version of Android are you using?
  • Roughly how many apps do you have installed?
  • What model of device is this on?

@ewnjtgouierg
Copy link
Author

ewnjtgouierg commented Feb 8, 2024

yeah, sorry, phone details:

Manufacturer: Xiaomi
Brand: Redmi
Model: M2004J19C
Model name: Redmi 9
Android version: 11 RP1A.200720.011
API Level: 30
MIUI version: MIUI Global 12.5.5 Stable 12.5.5.0(RJCRUXM)

52 installed apps

@ewnjtgouierg
Copy link
Author

my apologies - apparently those secondary glitches I listed happen in 2.0.0 too
but they are not frequent and so minor that i never paid attention to them, until they were emphasized by the lags in 2.1.1

@yatoman
Copy link

yatoman commented Feb 14, 2024

I can confirm the same problem with delay or lag since the upgrade to 2.1.1
on Motorola moto g62 5G (XT2223-1) android 13.

@CubeOfCheese
Copy link

I have noticed an increased lag recently too. On Samsung S22 running Android 14 and Unlauncher v2.1.1

I particularly notice it with the home button when I'm trying to exit an app. Sometimes the stock wallpaper even flashes on screen momentarily before the solid color background of unlauncher loads.

@tozpeak
Copy link

tozpeak commented Feb 20, 2024

I am a new user, and noticed an unexpected lag for such a launcher. I thought it was native Samsung issue though.

Brand: Samsung
Model: SM-M526B/DS
One UI: 5.1
Android: 13

@Knusper
Copy link

Knusper commented Feb 23, 2024

I downgraded to 2.0.0 on f-droid and can confirm that this version is significantly snappier than the latest version.

Galaxy A14
Android 13

@Dylan-Cairns
Copy link

Dylan-Cairns commented Mar 2, 2024

Same here,

Pixel 3
Android 12
78 apps

Otherwise I love the app, thank you for your effort!

@jkuester
Copy link
Owner

jkuester commented Mar 6, 2024

👍 Hoping to have some time in the near future to dig into this some more. As a note to my future self (or to anyone else who gets a chance to look at this), I think a good place to start would be to look at the various notifyDataSetChanged calls. These are noted as being bad for performance.

@khwolf
Copy link

khwolf commented Mar 24, 2024

Maybe it could help to have a central settings-class (e.g. as a singleton) to hold all the app settings as a proxy?
So read options from that class and have that class sync writes with the settings store. Could help with backup and restore of settings and make it easier to change the storage when android changes the prefered way to do so again.

@Chu-4hun
Copy link

Same issue as
#72 (comment)

But this time on 2.1.1 from fdroid

@Red-Teapot
Copy link

Red-Teapot commented Nov 17, 2024

I have the same issue on Xiaomi Mi 9T (M1903F10G), MIUI Global 12.0.9.0: when opening the home screen I would get 4-5 second delays randomly.

Tried reproducing it with Logcat and some debug prints - looks like BaseFragment.getInstalledApps() takes a while to run, usually about ~400 ms. I couldn't get ~4 s delays to reproduce while having Logcat attached though, but I suspect this is the problem.

Moving the getInstalledApps() call into the coroutine in refreshApps() seems to work but I'm not sure if that's a correct thing to do.

private fun refreshApps() {
    lifecycleScope.launch(Dispatchers.IO) {
        val installedApps = getInstalledApps()
        unlauncherDataSource.unlauncherAppsRepo.setApps(installedApps)
        viewModel.filterHomeApps(installedApps)
    }
}

I guess I'll wait a few days to see if the random delays come back, then maybe I can prepare a PR (assuming this project is still maintained).

P. S. I think enumerating all apps each time the launcher is shown is not a great idea in general. Perhaps using PackageManager to listen to app installs/uninstalls and having a cache somewhere would be better, but that would be quite a bit of work to implement.

P. P. S. I'm not an Android developer so take my comments with a grain of salt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants