mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick. This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed. Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
This commit is contained in:
parent
766b02c9cd
commit
0758ad0612
33 changed files with 79 additions and 51 deletions
|
|
@ -2077,7 +2077,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionContext &p_context
|
|||
|
||||
if (!_static) {
|
||||
List<MethodInfo> methods;
|
||||
bool is_autocompleting_getters = GLOBAL_GET("debug/gdscript/completion/autocomplete_setters_and_getters").booleanize();
|
||||
bool is_autocompleting_getters = GLOBAL_GET_CACHED(bool, "debug/gdscript/completion/autocomplete_setters_and_getters");
|
||||
ClassDB::get_method_list(type, &methods, false, !is_autocompleting_getters);
|
||||
for (List<MethodInfo>::Element *E = methods.front(); E; E = E->next()) {
|
||||
if (E->get().name.begins_with("_")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue