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

GDScript code completion is extremely laggy on Android Editor #98666

Closed
777joe opened this issue Oct 30, 2024 · 10 comments · Fixed by #101435
Closed

GDScript code completion is extremely laggy on Android Editor #98666

777joe opened this issue Oct 30, 2024 · 10 comments · Fixed by #101435

Comments

@777joe
Copy link

777joe commented Oct 30, 2024

Tested versions

Reproducible in build of current master branch - Godot v4.4.dev (8004c75).
Not reproducible in 4.4.dev3 / 4.3 stable

System information

Godot v4.4.dev (8004c75) - Android 14 - Single-window, 1 monitor - Vulkan (Mobile) - integrated Adreno (TM) 618 - (8 threads)

Issue description

GDScript autocomplete is now extremely laggy on the Android editor, with the editor freezing until the code completion dialog appears. The code completion delay and idle auto parse delay are in their defaults.
This does not happen on 4.4.dev3 or earlier.

Steps to reproduce

Just create a gdscript and type anything that prompts auto complete.

Minimal reproduction project (MRP)

None

@HolonProduction
Copy link
Member

Just to rule that out from the get go: Are you comparing a self-build Godot editor to the prebuild one from the Website? If so please build 4.4.dev3 yourself to make sure that this is not just an issue with compiler optimization. FYI 4.4.dev3 is built from commit f4af820 .

@777joe
Copy link
Author

777joe commented Oct 31, 2024

Just to rule that out from the get go: Are you comparing a self-build Godot editor to the prebuild one from the Website? If so please build 4.4.dev3 yourself to make sure that this is not just an issue with compiler optimization. FYI 4.4.dev3 is built from commit f4af820 .

I have been regularly testing with the build artefacts from CI after every commit. This behaviour wasn't there in last week's builds. I just mentioned 4.4.dev3 because it is the most recent official build. I also compiled master with production=yes and speed=optimize, but still get the same behaviour.

@777joe
Copy link
Author

777joe commented Nov 11, 2024

Ok, on git bisecting i found #88427 to be the problem. On reverting those changes, rebasing on master, and recompiling, the problem went away. Can anyone else confirm if this a bug?

@HolonProduction
Copy link
Member

Sounds like a performance regression.

We use the method to get an icon from a class name for every completion option, so the changes in there are probably to heavy to call for each completion option.

This seems like it could impact performance quite a bit:
https://github.com/CrayolaEater/godot/blob/fb58ea6c89ff3f9e970e436982c76e96adccdefc/editor/editor_node.cpp#L4845-L4846
Maybe a lightweight check on the script name before calling ResourceLoader.exists could prevent this. But personally I don't think get_class_icon should handle script paths at all, from its name I would assume it only handles class_name and native class names.

@HolonProduction
Copy link
Member

#101489 might have had an influence on this. I'm not able to reproduce the issue on my quite recent phone and I can't get a hold of my old low end tablet. Could someone check who is able to reproduce this?

@github-project-automation github-project-automation bot moved this to For team assessment in Platforms Issue Triage Feb 8, 2025
@syntaxerror247 syntaxerror247 moved this from Unassessed to Bad in 4.x Release Blockers Feb 9, 2025
@syntaxerror247 syntaxerror247 moved this from For team assessment to Needs further info in Platforms Issue Triage Feb 9, 2025
@syntaxerror247
Copy link
Member

syntaxerror247 commented Feb 9, 2025

@777joe Could you please share the hardware specs of your Android device?

@777joe
Copy link
Author

777joe commented Feb 9, 2025

@777joe Could you please share the hardware specs of your Android device?

Galaxy tab S6 Lite. Snapdragon 720G, Adreno 618, 4gb ram

@777joe
Copy link
Author

777joe commented Feb 9, 2025

#101489 might have had an influence on this. I'm not able to reproduce the issue on my quite recent phone and I can't get a hold of my old low end tablet. Could someone check who is able to reproduce this?

Tried the latest master artifact. Issue is still present on my low end Android device.

@AeioMuch
Copy link
Contributor

AeioMuch commented Feb 9, 2025

#101489 might have had an influence on this. I'm not able to reproduce the issue on my quite recent phone and I can't get a hold of my old low end tablet. Could someone check who is able to reproduce this?

Tried the latest master artifact. Issue is still present on my low end Android device.

Is #101435 still fixing it for you even after the changes from #101489 ?

@777joe
Copy link
Author

777joe commented Feb 10, 2025

#101489 might have had an influence on this. I'm not able to reproduce the issue on my quite recent phone and I can't get a hold of my old low end tablet. Could someone check who is able to reproduce this?

Tried the latest master artifact. Issue is still present on my low end Android device.

Is #101435 still fixing it for you even after the changes from #101489 ?

Yes, I applied that patch to master and built the editor apk, and autocomplete doesn't lag anymore.

@github-project-automation github-project-automation bot moved this from Fix pending review to Done in Platforms Issue Triage Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants