Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Ui slow on old Android device (OnePlus One) #426

Open
BattlefieldNoob opened this issue Apr 13, 2020 · 3 comments
Open

Ui slow on old Android device (OnePlus One) #426

BattlefieldNoob opened this issue Apr 13, 2020 · 3 comments
Labels
question Further information is requested

Comments

@BattlefieldNoob
Copy link

BattlefieldNoob commented Apr 13, 2020

Firstly, I thank you for this awesome library for unity (and I don't understand why isn't a official unity library/package), but I noticed that on my OnePlus One smartphone (or generally on old devices) the ui is very very slow, almost unusable (specially when scrolling a list/grid). I've tried also the UIWidgetsGallery, but I saw the same behavior (the framerate have some spikes at 15/10 fps).
I tested it on unity 2019.3.9f1 and 2020.1b5.
On iPhone XR it work very well.
I thought, it's possible to reduce the rendertexture resolution? The render phase should become faster right?

Thank you and sorry for my English

PS: I'm using Android 10 with custom ROM, but I don't have problems with other apps or games

@BattlefieldNoob
Copy link
Author

I attach screenshot of the unity profiler, using UIWidgetsGallery example

Scrolling up/down a two card list
ScrollListUpDown

Pressing a button from gallery home
ButtonClick

Pressing same button, but with deep profile enabled on inspection
ButtonClickDeepProfile

@BattlefieldNoob BattlefieldNoob changed the title Very slow on old Android device (OnePlus One) Ui slow on old Android device (OnePlus One) Apr 13, 2020
@zhuxingwei
Copy link
Contributor

Hi, Thanks a lot for the issue report and sorry for this late response.

(1) Yes, unlike flutter, UIWidgets relies on Unity runtime as its host. Therefore the runtime would add some extra burden to CPU, which may probably cause significant laggy on old devices.

(2) Currently UIWidgets is fully tested only on Unity 2019.1.14f1 (including performance tests). Therefore this performance issue may also be caused by some incompatibility between UIWidgets and the later versions of Unity.

(3) Yes, I think you can change the screen resolution of your project in PlayerSettings. It should remedy the performance issue if it is caused by a GPU bound.

@zhuxingwei zhuxingwei added the question Further information is requested label Apr 29, 2020
@PROGrand
Copy link

PROGrand commented Jan 8, 2021

I have poor repaint performance on almost all 2019-2020 Android devices with Unity 2020.2.1f1 (at least).
I remove frameSpeedup/frameCooldown functionality using following:

...
private static void FrameRateSpeedUp() {
}

private static void FrameRateCooldown() {
}

private void Start() {
	
	Unity.UIWidgets.UI.Window.onFrameRateSpeedUp = FrameRateSpeedUp;
	Unity.UIWidgets.UI.Window.onFrameRateCoolDown = FrameRateCooldown; 
...

At least with mine scenes all glitches gone.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants