You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +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:
@@ -38,7 +38,7 @@
|
||||
#include "scene/theme/theme_db.h"
|
||||
|
||||
void CodeEdit::_apply_project_settings() {
|
||||
symbol_tooltip_timer->set_wait_time(GLOBAL_GET("gui/timers/tooltip_delay_sec"));
|
||||
symbol_tooltip_timer->set_wait_time(GLOBAL_GET_CACHED(double, "gui/timers/tooltip_delay_sec"));
|
||||
}
|
||||
|
||||
void CodeEdit::_notification(int p_what) {
|
||||
|
||||
Reference in New Issue
Block a user