elsid
68fe6b9114
Use only item size to check whether item fits cache
...
Item size has to be counted anyway and there is no reason to check only navmesh
data first.
2021-02-04 01:12:59 +01:00
elsid
3a2cea5271
Use raw recast mesh data and off mesh connections for navmesh key
...
Serialization into a vector of chars produces inconsistent results that leads
to reduced cache hit rate. Using a structured object is a more clear solution
and allows to remove serialization and nontrivial key compare logic with more
straigt forward structured object comparison.
2021-02-04 01:01:15 +01:00
elsid
489107c5ee
Count navmesh cache key once in item size
...
Key is stored only in NavMeshTilesCache::Item, TileMap uses KeyView with
a pointer to a vector.
2021-02-04 00:44:23 +01:00
elsid
88ca4a1db6
Count navmesh cache hit rate
2021-02-04 00:35:24 +01:00
elsid
d2d8a7a940
Fix passing null to memcpy
...
/home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36:24: runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x55e37ba4cda5 in makeNavMeshKey /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36
#1 0x55e37ba4cda5 in DetourNavigator::NavMeshTilesCache::set(osg::Vec3f const&, osg::Vec2i const&, DetourNavigator::RecastMesh const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::NavMeshData&&) /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:81
#2 0x55e37fe3c861 in DetourNavigator::updateNavMesh(osg::Vec3f const&, DetourNavigator::RecastMesh const*, osg::Vec2i const&, osg::Vec2i const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::Settings const&, std::shared_ptr<Misc::ScopeGuarded<DetourNavigator::NavMeshCacheItem> > const&, DetourNavigator::NavMeshTilesCache&) /home/elsid/dev/openmw/components/detournavigator/makenavmesh.cpp:582
#3 0x55e37fb796ce in DetourNavigator::AsyncNavMeshUpdater::processJob(DetourNavigator::AsyncNavMeshUpdater::Job const&) /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:178
#4 0x55e37fb9a125 in DetourNavigator::AsyncNavMeshUpdater::process() /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:144
#5 0x7f013f585c23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#6 0x7f013f8c63e8 in start_thread (/usr/lib/libpthread.so.0+0x93e8)
#7 0x7f013e91d292 in __GI___clone (/usr/lib/libc.so.6+0x100292)
2021-01-09 22:59:24 +01:00
elsid
7591d45008
Use memcpy to create navmesh key
...
Implementation with memcpy is ~13 times faster.
2020-10-08 19:55:56 +02:00
elsid
4624f31788
Report navigator stats
2019-03-17 22:15:18 +03:00
elsid
dd0b45ede6
Do not pass nullptr to std::memcmp
2019-03-14 22:15:57 +03:00
elsid
68948bc847
Avoid key allocation to find tile in cache
2019-03-11 03:01:41 +03:00
elsid
9d61c49478
Store key by reference in tiles map
2019-03-10 23:56:52 +03:00
elsid
b6243e7d1f
Fix name styleguide
2019-03-08 15:02:49 +03:00
Andrei Kortunov
3032b177a1
Remove redundant includes
2019-02-23 08:02:12 +04:00
elsid
6e78fbb538
Double key size for item cache size
2018-11-05 02:21:19 +03:00
elsid
696bb9adc8
Add missing decrease for free navmesh data size
2018-11-05 02:21:18 +03:00
Andrei Kortunov
a387c6b910
Fix MSVC2015 C4503 warning
2018-11-04 11:11:55 +04:00
elsid
b77684a135
Add TODOs
2018-11-03 16:15:32 +03:00
elsid
2ba026e2b2
Limit navmesh cache size by data size + key size
2018-11-03 16:14:07 +03:00
elsid
af2f4e8424
Allow to use zero cache size
2018-10-28 16:54:06 +03:00
elsid
ed73d130f9
Cache navmesh tiles
...
Use LRU modification to hold currently used items. Use RecastMesh binary
data for item key.
Store original pointer of btCollisionShape in user pointer to make available
it as an identifier within all duplicates. Use pointer to heights data array
for btHeightfieldTerrainShape.
2018-10-13 22:22:12 +03:00