Improve performance of setPropertyValue function (#3579)

* Cache full property URIs
  * Multithreaded handling

---------

Co-authored-by: Emma Broman <emma.broman@liu.se>
This commit is contained in:
Alexander Bock
2025-04-15 17:43:57 +02:00
committed by GitHub
parent b5dbee2164
commit b554187d76
12 changed files with 169 additions and 89 deletions

View File

@@ -1726,6 +1726,19 @@ LoadingScreen* OpenSpaceEngine::loadingScreen() {
return _loadingScreen.get();
}
void OpenSpaceEngine::invalidatePropertyCache() {
_isAllPropertiesCacheDirty = true;
}
const std::vector<properties::Property*>& OpenSpaceEngine::allProperties() const {
if (_isAllPropertiesCacheDirty) {
_allPropertiesCache = global::rootPropertyOwner->propertiesRecursive();
_isAllPropertiesCacheDirty = false;
}
return _allPropertiesCache;
}
AssetManager& OpenSpaceEngine::assetManager() {
ghoul_assert(_assetManager, "Asset Manager must not be nullptr");
return *_assetManager;