From c217041afd6df218d61c0a455a0adce8e875132e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Thu, 28 Dec 2023 10:18:05 +0100 Subject: [PATCH] Remove traces of the extinct RID preallocate feature --- core/config/project_settings.cpp | 1 - doc/classes/ProjectSettings.xml | 3 --- servers/physics_server_2d_wrap_mt.cpp | 2 -- servers/physics_server_2d_wrap_mt.h | 1 - servers/physics_server_3d_wrap_mt.cpp | 2 -- servers/physics_server_3d_wrap_mt.h | 1 - 6 files changed, 10 deletions(-) diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 56e041be1b9..b84534ac006 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1462,7 +1462,6 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("debug/settings/crash_handler/message.editor", String("Please include this when reporting the bug on: https://github.com/godotengine/godot/issues")); GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), 2); - GLOBAL_DEF(PropertyInfo(Variant::INT, "memory/limits/multithreaded_server/rid_pool_prealloc", PROPERTY_HINT_RANGE, "0,500,1"), 60); // No negative and limit to 500 due to crashes. GLOBAL_DEF_RST("internationalization/rendering/force_right_to_left_layout_direction", false); GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "internationalization/rendering/root_node_layout_direction", PROPERTY_HINT_ENUM, "Based on Application Locale,Left-to-Right,Right-to-Left,Based on System Locale"), 0); diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index ab92916320d..1d3787163ad 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1993,9 +1993,6 @@ Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. - - This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. - Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size]. diff --git a/servers/physics_server_2d_wrap_mt.cpp b/servers/physics_server_2d_wrap_mt.cpp index f4682b7c14f..a23bb5e7019 100644 --- a/servers/physics_server_2d_wrap_mt.cpp +++ b/servers/physics_server_2d_wrap_mt.cpp @@ -120,8 +120,6 @@ PhysicsServer2DWrapMT::PhysicsServer2DWrapMT(PhysicsServer2D *p_contained, bool physics_server_2d = p_contained; create_thread = p_create_thread; - pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc"); - if (!p_create_thread) { server_thread = Thread::get_caller_id(); } else { diff --git a/servers/physics_server_2d_wrap_mt.h b/servers/physics_server_2d_wrap_mt.h index 0ae004da198..3bebe5df851 100644 --- a/servers/physics_server_2d_wrap_mt.h +++ b/servers/physics_server_2d_wrap_mt.h @@ -66,7 +66,6 @@ class PhysicsServer2DWrapMT : public PhysicsServer2D { bool first_frame = true; Mutex alloc_mutex; - int pool_max_size = 0; public: #define ServerName PhysicsServer2D diff --git a/servers/physics_server_3d_wrap_mt.cpp b/servers/physics_server_3d_wrap_mt.cpp index 59db4617d04..feb17cad844 100644 --- a/servers/physics_server_3d_wrap_mt.cpp +++ b/servers/physics_server_3d_wrap_mt.cpp @@ -120,8 +120,6 @@ PhysicsServer3DWrapMT::PhysicsServer3DWrapMT(PhysicsServer3D *p_contained, bool physics_server_3d = p_contained; create_thread = p_create_thread; - pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc"); - if (!p_create_thread) { server_thread = Thread::get_caller_id(); } else { diff --git a/servers/physics_server_3d_wrap_mt.h b/servers/physics_server_3d_wrap_mt.h index 99179d8248b..fc8930977d1 100644 --- a/servers/physics_server_3d_wrap_mt.h +++ b/servers/physics_server_3d_wrap_mt.h @@ -65,7 +65,6 @@ class PhysicsServer3DWrapMT : public PhysicsServer3D { bool first_frame = true; Mutex alloc_mutex; - int pool_max_size = 0; public: #define ServerName PhysicsServer3D