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

Text rendering performance low due to missing batching #19917

Open
Geequlim opened this issue Jul 2, 2018 · 11 comments

Comments

Projects
None yet
7 participants
@Geequlim
Copy link
Member

commented Jul 2, 2018

Godot version:

Godot 3.1 compiled with 54988df

OS/device including version:

Android 7.1.2
Qualcomm® Adreno™ 430 GPU OpenGL ES 3.1

Issue description:

Text rendering harms the FPS on Android with GLES3.
In the screenshots below the same scene rendered with diffrent text content.
More text rendered less FPS.

screenshot-1530551860525

screenshot-1530551712802

Steps to reproduce:

  • Create a RichTextLabel and fill a long text as its text
  • Export and run it on Android with GLES3

Minimal reproduction project:

@akien-mga akien-mga changed the title Text rendering performance is too low Text rendering performance is too low on Android Jul 2, 2018

@Geequlim

This comment has been minimized.

Copy link
Member Author

commented Jul 2, 2018

@akien-mga I don't think this problem is only for Android. It is more obviously on Android as it can't reach 60 FPS.
If I didn't limit the max FPS to 60 on my Linux desktop. The FPS can still down with the large text scene.

2018-07-03 02-30-17
2018-07-03 02-30-37

@mrcdk

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2018

2D doesn't batch anything so each character is a draw call. It looks like you are working on an app so enabling low processor mode would make it only render when needed.

@reduz

This comment has been minimized.

Copy link
Member

commented Jul 3, 2018

@mhilbrunner mhilbrunner changed the title Text rendering performance is too low on Android Text rendering performance low due to missing batching Jul 5, 2018

@mhilbrunner

This comment has been minimized.

Copy link
Member

commented Jul 5, 2018

Related issues:
#5838
#11797

@akien-mga

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

@Geequlim Would you have a test project to share for @dragmz to test their text batching WIP?

@Geequlim

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2018

@akien-mga Of couse yes

@Geequlim

This comment has been minimized.

Copy link
Member Author

commented Jul 20, 2018

@dragmz You can download this project for testing
text_rendering.zip

@dragmz

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2018

Thanks @Geequlim

Here are my first results for GLES2: (batching vs master FPS with given number of "Add More Text"
clicks):

1024k RAM vertex buffer

Empty: no change
100 "Add More Text" clicks: 175 vs 53 [~3.3]
200: 65 vs 28 [~2.3]
300: 35 vs 19 [~1.8]
400: 21 vs 14 [~1.5]
500: 14 vs 12 [~1.2]

10024k buffer

100: 250 FPS
200: 150
300: 104
400: 73
500: 61

That's on Intel GPU. I should be able to test on Android but that may take me a few days.

@dragmz dragmz referenced this issue Jul 20, 2018

Closed

Fix GLES2 rendering performance #20077

4 of 4 tasks complete

@akien-mga akien-mga added this to the 3.1 milestone Jul 22, 2018

dragmz added a commit to dragmz/godot that referenced this issue Aug 13, 2018

Batch GLES2 draw calls
Fixes godotengine#19917

Adds GLES2 draw calls batching for the same render list item that uses
multiple rasterizer commands (e.g. Label node; a node with multiple
GDScript draw_* calls).

dragmz added a commit to dragmz/godot that referenced this issue Aug 13, 2018

Batch GLES2 draw calls
Fixes godotengine#19917

Adds GLES2 draw calls batching for the same render list item that uses
multiple rasterizer commands (e.g. Label node; a node with multiple
GDScript draw_* calls).
@akien-mga

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

Reopening as #20965 was reverted in #21204.

@akien-mga akien-mga reopened this Aug 20, 2018

@reduz

This comment has been minimized.

Copy link
Member

commented Sep 7, 2018

@akien-mga did we not merge a new batching afterwards?

@akien-mga

This comment has been minimized.

Copy link
Member

commented Sep 10, 2018

No, #20965 was the "new" batching (the previous one was never merged, it was rejected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.