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

UI performance is too slow on Android #11797

Closed
kosz78 opened this issue Oct 3, 2017 · 14 comments
Closed

UI performance is too slow on Android #11797

kosz78 opened this issue Oct 3, 2017 · 14 comments

Comments

@kosz78
Copy link
Contributor

kosz78 commented Oct 3, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Godot 3.0 build 6dc1025

Issue description:
When open UI, performance droped to 10 fps from 30

D3 scene with minimum UI elements:
image

Complex UI window:
image

I dont use UI atlas in game

@toger5
Copy link
Contributor

toger5 commented Oct 3, 2017

What styleboxes are u using?

@kosz78
Copy link
Contributor Author

kosz78 commented Oct 3, 2017

@toger5 mostly not defined, in some panel it specified as custom StyleBoxTexture

@kosz78
Copy link
Contributor Author

kosz78 commented Oct 3, 2017

BTW, glDrawArrays are performed for each symbol of rendered text, may be here can be some points for optimization

@reduz
Copy link
Member

reduz commented Oct 3, 2017 via email

@toger5
Copy link
Contributor

toger5 commented Oct 3, 2017

I only can say for style box flat that it does an immediate draw call (sending a vertex array) for each draw iteration. + for each sb...
I m sure that this is not the most performant approach but it seems okay enough for the editor atm...
Sb texture also does immediate draw calls afak but it uses only 16verts i think?

@reduz
Copy link
Member

reduz commented Oct 3, 2017 via email

@kosz78
Copy link
Contributor Author

kosz78 commented Oct 3, 2017

We use Sony Xperia E5 and IPhone 6, for both devices UI performance is slow, I will remove style boxes and test again

@Zylann
Copy link
Contributor

Zylann commented Oct 3, 2017

Do we know for sure it's due to pixel shaders? Wouldn't an atlas and batching improve the situation regardless?

@reduz
Copy link
Member

reduz commented Oct 3, 2017

It's not nearly an amount of calls that would slow someting down to 10fps and, as I mentioned before, this works fine in Godot 2 which uses a lot more calls to render this stuff.

I think it's probably pixel performance. For styleboxes, godot does some computations in the fragment shader that are probably not nice in mobile, where all texture reads are expected to go via prefetch in most chipsets.

@groud groud added this to the 3.0 milestone Oct 3, 2017
@reduz
Copy link
Member

reduz commented Nov 7, 2017

Kicking this to 3.1, as it will be fixed in the upcoming GLES2 backend

@reduz
Copy link
Member

reduz commented Sep 5, 2018

This may have been fixed in the GLES2 backend due to batching, and GLES3 backend will be gone after 3.1. Can anyone test on GLES2?

@akien-mga
Copy link
Member

@reduz Last batching attempt was reverted from GLES2 backend.

@akien-mga
Copy link
Member

How is the performance with the GLES2 backend? It's still not batched, but it might perform better than GLES3 nevertheless.

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 19, 2019
@akien-mga
Copy link
Member

No answer, and in my tests UI performance on Android GLES2 seems good, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants