mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-17 01:10:59 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user