Optimize various initial pre-allocs to happen within memory tracing
This commit is contained in:
@@ -96,9 +96,9 @@ namespace
|
||||
}
|
||||
};
|
||||
|
||||
Dictionary<Guid, ScriptingObjectData> _objectsDictionary(1024 * 16);
|
||||
Dictionary<Guid, ScriptingObjectData> _objectsDictionary;
|
||||
#else
|
||||
Dictionary<Guid, ScriptingObject*> _objectsDictionary(1024 * 16);
|
||||
Dictionary<Guid, ScriptingObject*> _objectsDictionary;
|
||||
#endif
|
||||
bool _isEngineAssemblyLoaded = false;
|
||||
bool _hasGameModulesLoaded = false;
|
||||
@@ -179,6 +179,8 @@ bool ScriptingService::Init()
|
||||
PROFILE_MEM(Scripting);
|
||||
Stopwatch stopwatch;
|
||||
|
||||
_objectsDictionary.EnsureCapacity(16 * 1024);
|
||||
|
||||
// Initialize managed runtime
|
||||
if (MCore::LoadEngine())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user