Commit Graph

22 Commits (master)

Author SHA1 Message Date
elsid 16410d0960
Use std::string for ResourceManager cache key
Otherwise terrain textures cache has zero hits because it stores not normalized
paths. Due to implicit conversion it's possible to add entry with
addEntryToObjectCache passing a string that is converted into normalized path.
But then getRefFromObjectCache called with original value does not find this
entry because it's not converted and overloaded operators are used instead.
10 months ago
elsid cd3c3ebadb
Use VFS::Path::Normalized for ResourceManager cache key 10 months ago
elsid 56401a90a1
Merge GenericObjectCache update and remove functions
They are always called together. Single iteration over the items is more
efficient along with locking the mutex only once.
1 year ago
elsid 053a3caf7b
Pass cache expiry delay to GenericResourceManager constructor 1 year ago
elsid 52ab47771c
Initialize expiry delay for all GenericResourceManager instances 1 year ago
elsid b6a3d3c906
Make BaseResourceManager abstract 1 year ago
elsid 3202900fd3
Make GenericResourceManager::setExpiryDelay final 1 year ago
Evil Eye eeda48ec50 Drop support for --fs-strict 2 years ago
Evil Eye b94818b24a Tweak message and temporarily set model ttl to 0 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Bo Svensson f62adab43a
Avoid the terrain sync completely in most cases (#3103)
We can take elsid's commit 605cb8d further by avoiding the terrain sync completely in most cases. Currently in changeCellGrid we wait for a new preloading task to ensure the getPagedRefnums for the new active cells have been filled in by object paging. This is usually not necessary because we have already completed a preload in the past containing these active cells. With this PR we remember what we preloaded and skip the terrain sync if it is not needed.
3 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Andrei Kortunov 2ed05a5195 Implement generic caching system 6 years ago
scrawl 4fba157d3b Implement releaseGLObjects for cached resources 7 years ago
Kyle Cooley 742bd00ec6 Clear cached resources 7 years ago
scrawl 051c17a184 Make reportStats const 8 years ago
scrawl 8f79fa3d72 Add resource statistics panel opened with F4 8 years ago
scrawl 2eaf96e3bf Make ResourceManager destructor virtual 9 years ago
scrawl 0865cea211 Preload terrain 9 years ago
scrawl a81b10b415 Make the cache expiryDelay configurable 9 years ago
scrawl c155680d3c Customize ObjectCache for more efficient locking in removeExpiredObjectsInCache 9 years ago
scrawl df57d4bfba Use a common base class for resource managers
Implement updateCache to delete unreferenced cached objects when they have not been referenced for a while.
9 years ago