1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

CommandQueueMT: Pre-allocate memory to avoid a bunch of allocations at startup

This commit is contained in:
Pedro J. Estébanez
2024-05-08 19:17:08 +02:00
parent c4279fe3e0
commit c0529dc4f2
2 changed files with 2 additions and 3 deletions

View File

@@ -42,6 +42,7 @@ void CommandQueueMT::unlock() {
}
CommandQueueMT::CommandQueueMT() {
command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
}
CommandQueueMT::~CommandQueueMT() {