You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/resource
elsid 3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
3 years ago
..
animation.cpp Use const auto& 4 years ago
animation.hpp OSG-Collada animation support 4 years ago
bulletshape.cpp Handle NCC flag in Nif files. Objects with this flag will collide only with camera. 3 years ago
bulletshape.hpp Handle NCC flag in Nif files. Objects with this flag will collide only with camera. 3 years ago
bulletshapemanager.cpp Use MurmurHash3_x64_128 for file hash 3 years ago
bulletshapemanager.hpp Mark overrided methods by override keyword 4 years ago
foreachbulletobject.cpp Limit the number of simultaneously open not actively used content files 3 years ago
foreachbulletobject.hpp Limit the number of simultaneously open not actively used content files 3 years ago
imagemanager.cpp skip flipping of 3D textures which is unsupported in OSG 3 years ago
imagemanager.hpp skip flipping of 3D textures which is unsupported in OSG 3 years ago
keyframemanager.cpp converts remaining osg::NodeCallback (#3147) 3 years ago
keyframemanager.hpp Sprinkle some references where it makes sense 4 years ago
multiobjectcache.cpp Replace OpenThreads by std types 5 years ago
multiobjectcache.hpp Replace OpenThreads by std types 5 years ago
niffilemanager.cpp Make reportStats const 8 years ago
niffilemanager.hpp Mark overrided methods by override keyword 4 years ago
objectcache.hpp Replace zeroes and nulls by nullptrs 4 years ago
resourcemanager.hpp Avoid the terrain sync completely in most cases (#3103) 3 years ago
resourcesystem.cpp Replace new with make_unique in components 3 years ago
resourcesystem.hpp Implement generic caching system 6 years ago
scenemanager.cpp moddable post-processing pipeline 3 years ago
scenemanager.hpp moddable post-processing pipeline 3 years ago
stats.cpp Replace empty std::string assignments 3 years ago
stats.hpp Collect all available stats if OPENMW_OSG_STATS_FILE is set and point to 4 years ago