Lower memory usage of Behavior Parameter Table by 10MB (#627)

* Added caching for table

Added caching for table

Add more caching

Update MasterServer.cpp

grds

Update CDBehaviorParameterTable.cpp

Update CDBehaviorParameterTable.h

Update CDBehaviorTemplateTable.cpp

Update Behavior.cpp

Update Behavior.cpp

change to map

Remove redundant query

* Remove include

* change to enum

* Update Behavior.cpp

* Use already cached table

* Update Behavior.cpp

* Reduce memory usage

Reduces the memory usage for the BehaviorParameter table by 10MB in memory.

* Update CDBehaviorTemplateTable.cpp
This commit is contained in:
David Markowitz
2022-07-11 20:43:09 -07:00
committed by GitHub
parent 06217ad5e3
commit b7497a47e4
5 changed files with 30 additions and 15 deletions

View File

@@ -445,7 +445,7 @@ Behavior::Behavior(const uint32_t behaviorId)
this->m_effectId = templateInDatabase.effectID;
this->m_effectHandle = templateInDatabase.effectHandle != "" ? new std::string(templateInDatabase.effectHandle) : nullptr;
this->m_effectHandle = *templateInDatabase.effectHandle != "" ? new std::string(*templateInDatabase.effectHandle) : nullptr;
}