Godot version:
3.0.6-stable
OS/device including version:
Android 8.0.0/ Samsung Galaxy S7
Issue description:
_Edited_
2D Game has as stable 60 FPS (with Sprites, large Textures, a lot of Stuff ) until I add just the simplest custom drawing script e.g. for drawing the outline of a Node2D. Now the framerate on my Android S7 drops dramatically to about 6 FPS with just a few instances of that Node2D + custom drawing. A custom _draw() kills fps more than anything.
Update: I'm not refering to the Polygon2D issue but to the slow Custom drawing on any Node2D. Therefore I attached a second project with only Node2D instead of Polygon2D and edited the description to be more precise.
Steps to reproduce:
Example Project attached. Just hit the buttons to add Node2Ds with and without outline (custom draw) and watch the framerate drop on Android device.
Minimal reproduction project:
CustomDrawingSlowOnAndroid.zip
CustomDrawingSlowOnAndroid_Node2D.zip
I gues it's duplicated or related of #19943
@volzhs the Poly2D part yes, but the custom drawing part which is my main issue I didn't find any open issue. I have the same problem if I use just a Node2D with custom drawing instead of Polygon2D. Here is the same project without Poly2D and it has the same issues.
CustomDrawingSlowOnAndroid_Node2D.zip
I didn't test it recently but I had a same problem with draw_line while ago.
I guess it's also 3.1 issue. cc @akien-mga @reduz
Having the same issue here. It was very difficult to find the cause, because id been testing on PC, and my test device was high-end (which masks the problem a little bit). Always test often on a low-end device if you can.
If someone is looking for a workaround(like I did for days) for this issue try changing the buffer sizes in Project Settings > Rendering > Limits. Lowering all of them to 4kb in official Godot 3.1.1 build drastically improved FPS in my game when rendering custom shapes.
Also this issue is probably related to #25400, that's where I've found this workaround.
Workaround didn't work for me. I don't think this is a driver issue anymore, but a legit issue with Godot.
https://github.com/godotengine/godot/issues/25400#issuecomment-530345891
I'll reiterate here; I'm happy to work with someone to do what it takes to get this fixed. At the moment it could kill my entire project.
Fortunately I've been able to switch to drawing with 2D meshes and cleared myself a way to progress forward.
Most helpful comment
If someone is looking for a workaround(like I did for days) for this issue try changing the buffer sizes in Project Settings > Rendering > Limits. Lowering all of them to 4kb in official Godot 3.1.1 build drastically improved FPS in my game when rendering custom shapes.
Also this issue is probably related to #25400, that's where I've found this workaround.