diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-05-08 19:17:08 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-05-09 11:51:07 +0200 |
commit | c0529dc4f28f9ebe837a085a2b0e21d02302446d (patch) | |
tree | 73ba87a1717653f403d9dd370302a09c21d492ea /core/templates/command_queue_mt.cpp | |
parent | c4279fe3e0b27d0f40857c00eece7324a967285f (diff) | |
download | redot-engine-c0529dc4f28f9ebe837a085a2b0e21d02302446d.tar.gz |
CommandQueueMT: Pre-allocate memory to avoid a bunch of allocations at startup
Diffstat (limited to 'core/templates/command_queue_mt.cpp')
-rw-r--r-- | core/templates/command_queue_mt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/templates/command_queue_mt.cpp b/core/templates/command_queue_mt.cpp index d9e5e0b217..ef75a70868 100644 --- a/core/templates/command_queue_mt.cpp +++ b/core/templates/command_queue_mt.cpp @@ -42,6 +42,7 @@ void CommandQueueMT::unlock() { } CommandQueueMT::CommandQueueMT() { + command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024); } CommandQueueMT::~CommandQueueMT() { |