Jump to content

So how do you run this thing? (Pathfinding)


Qie Niangao
 Share

You are about to reply to a thread that has been inactive for 4247 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

What lag I'm seeing these days is pretty much the same as what I saw before Pathfinding: The same sim is constantly lagged as before, and the same sims that had lots of Spare Time still have lots of Spare Time -- maybe not quite as much, but nothing I'm overly concerned about. So this isn't a rant, but... more of a puzzle.  I'd like to do as much as I can to make my stuff as efficient as possible, and now that Pathfinding has been on the Main Grid for a while, I want to "optimize" for that, if that's even meaningful, even though none of the sims on which I have property actually have any Pathfinding Characters.

Because there aren't any Characters, I kinda thought Pathfinding should use at most negligible frame time--but that doesn't seem to be the case.  Looking at the new metrics on Statistics, the Pathfinding / AI Step TIme seems to be just over 3msec, and if I add that number to the other Physics-related metrics in Time Details (Physics Step, Update Phys Shapes, and Physics Other), I seem to get the total shown as Physics Time.  That makes sense; it means that this AI Step Time isn't some bogus number I should ignore.

Despite no Pathfinding Characters running on the sim, it's showing 23 "Skipped Silhouette Steps" per second. No idea if that's bad, but it's not obvious why it should need to skip any.  (Or, maybe there are only 23 of these steps possible per second, and it skips them all because there aren't any Characters?)

Regarding this metric, the above-linked page saith: 

  • Skipped Silhouette Steps - The number of steps that are skipped per second in computing the influence of objects of type Movable Obstacles on the navmesh. A high value here means that objects on the region are marked as Movable Obstacles and could be contributing to improper pathfinding behavior on the region. To lower this value, set all objects that do not move to either type Walkable or Static Obstacle, and optimize any Movable Obstacle shapes to meet the Good Building Practices Guide.

Having done nothing yet to optimize for Pathfinding on this sim, there were tons of Movable Obstacles, so I thought I'd try to improve that using the handy-dandy "update-pathfinding-objects" command in the sim debug console. That made about 300 of my unscripted Movable Obstacles into Static Obstacles -- but had no discernable effect on the statistics.

Now, there are lots more Movable Obstacles in the sim, some of which are my scripted objects, so I could go through and futz with each of those, but now I'm wondering if any of this could ever matter as long as there are no Characters on the sim.

But I'm also wondering, wtf is Havoc doing during those 3msec/frame attributed to AI Step Time, if there are no Characters to herd around?

Link to comment
Share on other sites

Hi Qie,

 

Those 3ms are spent updating the navmesh to account for movable obstacles in case any pathfinding characters should need to navigate around them. You make an excellent point though: why bother updating the navmesh at all when there are no characters? I'll need to ponder this some more--it might seem obvious that we should skip the work entirely in that case, but we need to fully consider any side effects that might have. I'll definitely give it some thought and perhaps implement that optimization in an upcoming server version.

 

In any case, 23 skipped updates per second means that each update took roughly twice as long as we'd like, and so we're throttling them to 50% (0 skipped frames indicates no throttling, 45 indicates that none are ever occurring--a theoretical impossibility except for rounding errors in reporting). Setting additional objects to static obstacle or walkable should reduce this number.

 

Falcon, reporting from vacation on Kona, Hawaii.

Link to comment
Share on other sites

Thanks for the reply, Falcon; that's very informative and helpful indeed.

I'm encouraged to tidy-up more of my unnecessarily movable obstacles. I'm mostly working on a Mainland sim where I own maybe half the land and objects, so it's not a "pure" environment for testing, by any means.  On the Mainland especially, Pathfinding Characters may wander into and across the sim at any time, so yeah: the navmesh can't get too far out of sync with the movable obstacles.

Thanks again!

Link to comment
Share on other sites


Falcon Linden wrote:

Hi Qie,

 

Those 3ms are spent updating the navmesh to account for movable obstacles in case any pathfinding characters should need to navigate around them. You make an excellent point though: why bother updating the navmesh at all when there are no characters? I'll need to ponder this some more--it might seem obvious that we should skip the work entirely in that case, but we need to fully consider any side effects that might have. I'll definitely give it some thought and perhaps implement that optimization in an upcoming server version.

 

In any case, 23 skipped updates per second means that each update took roughly twice as long as we'd like, and so we're throttling them to 50% (0 skipped frames indicates no throttling, 45 indicates that none are ever occurring--a theoretical impossibility except for rounding errors in reporting). Setting additional objects to static obstacle or walkable should reduce this number.

 

Falcon, reporting from vacation on Kona, Hawaii.

It may make sense to have navmesh updates work like region idling, with updates still being done on sims without pathfinding characters but at a greatly reduced rate. Realistically, most regions in SL are NEVER going to be optimized, and a lot of them are never going to see a pathfinding character. There are many regions that are practically museums of a Second LIfe from years with two zeros in them, especially on the mainland. I haven't looked at too many regions with a patfinding-enabled viewer but the ones I have are skipping more than half of the patfinding frames in sims with very few avatars and no pathfinding characters. Physics time is typically running right around the 4ms level that we were told would be a worst-case scenario on most of the sims I visit, again with no active pathfinding characters. I'm far from being anti-pathfinding but this time sink isn't making pathfinding many friends right now, which will just lead to more people turning it off or blaming it for all of their problems.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4247 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...