Add various improvements

This commit is contained in:
Wojtek Figat
2025-08-11 23:47:48 +02:00
parent 1bedfd3adf
commit 7fcf6f9c97
4 changed files with 14 additions and 10 deletions

View File

@@ -15,14 +15,9 @@
namespace
{
CriticalSection Locker;
#if USE_EDITOR
Array<FlaxFile*> Files(1024);
Array<FlaxPackage*> Packages;
#else
Array<FlaxFile*> Files;
Array<FlaxPackage*> Packages(64);
#endif
Dictionary<String, FlaxStorage*> StorageMap(2048);
Array<FlaxPackage*> Packages;
Dictionary<String, FlaxStorage*> StorageMap;
}
class ContentStorageService : public EngineService
@@ -231,6 +226,12 @@ void ContentStorageManager::GetStorage(Array<FlaxStorage*>& result)
bool ContentStorageService::Init()
{
#if USE_EDITOR
Files.EnsureCapacity(1024);
#else
Packages.EnsureCapacity(64);
#endif
StorageMap.EnsureCapacity(2048);
System = New<ContentStorageSystem>();
Engine::UpdateGraph->AddSystem(System);
return false;