Use R-tree for dynamic priority of navmesh async job

This commit is contained in:
elsid 2024-04-06 01:10:48 +02:00
parent 17bd571a65
commit 50f4471750
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
10 changed files with 572 additions and 126 deletions

View file

@ -49,6 +49,8 @@ namespace Resource
std::vector<std::string> generateAllStatNames()
{
constexpr std::size_t itemsPerPage = 24;
constexpr std::string_view firstPage[] = {
"FrameNumber",
"",
@ -76,6 +78,8 @@ namespace Resource
"",
};
static_assert(std::size(firstPage) == itemsPerPage);
constexpr std::string_view caches[] = {
"Node",
"Shape",
@ -100,7 +104,9 @@ namespace Resource
constexpr std::string_view navMesh[] = {
"NavMesh Jobs",
"NavMesh Waiting",
"NavMesh Removing",
"NavMesh Updating",
"NavMesh Delayed",
"NavMesh Pushed",
"NavMesh Processing",
"NavMesh DbJobs Write",
@ -129,7 +135,8 @@ namespace Resource
for (std::string_view name : cellPreloader)
statNames.emplace_back(name);
statNames.emplace_back();
while (statNames.size() % itemsPerPage != 0)
statNames.emplace_back();
for (std::string_view name : navMesh)
statNames.emplace_back(name);