View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003451 | Spring engine | General | public | 2013-02-08 21:18 | 2014-01-08 03:07 | ||||
Reporter | abma | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 91.0.1+git | ||||||||
Target Version | 92.0 | Fixed in Version | |||||||
Summary | 0003451: Initializing PathCache takes very long (>1 minute) | ||||||||
Description | could be omp related?! | ||||||||
Steps To Reproduce | didn't report this, because i always used a debug compile, now its the first time i use a release build... | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2013-02-08 21:20 |
Spring 91.0.1-1321-gc19898c release (OMP) |
abma (administrator) 2013-02-08 21:21 |
also "Initializing PathCache" takes ages, maybe 2 minutes!? |
jK (developer) 2013-02-08 22:30 |
"Initializing PathCache" stage isn't related to the previous pathing stages and is new in 92.0 it's by design slow and can hardly optimized, except faster pathfinder itself |
Kloot (developer) 2013-02-08 22:42 Last edited: 2013-02-08 22:44 |
It could be made faster by only calling UpdateFull if Lua has triggered any heightmap changes and letting normal map features be gradually repathed as before. |
jK (developer) 2013-02-08 22:45 |
many map features can cause a lot of dirty squares, too |
Kloot (developer) 2013-02-08 23:52 Last edited: 2013-02-08 23:52 |
nobody ever reported that being much of a problem (unlike changes caused by Lua) and now the final loading stage is ALWAYS SUPER SLOW on such maps |
jK (developer) 2013-02-09 08:12 Last edited: 2013-02-09 08:13 |
Before the buffered patch cache was initialized AFTER the map feature were placed. You moved the map feature placement behind the pather, so the game already start with a lot dirty squares taking minutes to calc if my tests were right. |
Kloot (developer) 2013-02-09 11:05 Last edited: 2013-02-09 11:12 |
Yes and no. In 91.0, features were loaded _before_ the pathfinder, so it _never_ received TerrainChanged events from them. After my change it did receive those events but they were still processed _gradually_ over many simframes. However with the UpdateFull call in LoadFinalize feature-heavy maps can now cause minute-long _hangs_. |
abma (administrator) 2013-02-09 12:10 Last edited: 2013-02-09 12:19 |
if i understood it right the problem seems to get worse by gadgets which: - place many features - change heightmap - place many units at game start / after the pathfinder is initialized? if so: can't the engine offer a way to place units/features or change heigtmap before the pathfinder is initialized? would this fix the problem? i know this would require to change some maps... |
Kloot (developer) 2013-02-09 12:51 |
That requires creating the Lua environment much earlier which is near-impossible now due to dependency hell. The only viable solution is to not eat through every pending update in one single frame. |
jK (developer) 2013-02-09 13:42 Last edited: 2013-02-09 13:46 |
I added the alt+b pather info & UpdateFull cause my profiling showed that some maps started with such many dirty squares that it takes >10mins to process them continuously ingame. Also they block any new terrain updates -> pathfinder won't ever reach a decent amount of dirty squares in a 30mins match. And the pathfinder will run the whole time at 100% of its max allowed time. viable solutions I see: 1. faster pathfinder, I see another ~ 30% speedup possibility in it. 2. split pathfinder creation & path filecache initialization, so it can run after Lua |
abma (administrator) 2013-06-03 08:56 |
2. split pathfinder creation & path filecache initialization, so it can run after Lua imo this becomes more important over time as people seems to write code, that modifies map in gadgets... also feature placement affects this, so it would be good if lua-code could somehow run before pathcache is created... maybe add some modoption that allows to disable the pathcache creating / loading and allow creation of it directly before game start? |
PepeAmpere (reporter) 2013-06-04 05:07 |
yes, if it would be possible to touch the "height map" just in the middle of the conversion of heightmap-image => into some spring heightmap representation, it would be the perfect. Many ways of generating map need somehow play with this property of map and path calculations before lua touch is wasting of time. |
jK (developer) 2013-06-04 13:24 |
| maybe add some modoption that allows to disable the pathcache creating / loading and allow creation of it directly before game start? ??? You didn't seem to understand the current system at all. |
PepeAmpere (reporter) 2013-06-04 19:42 |
Truth is i dont get it at all, but from loading screens i get information about many operations over "some" heightmap representation, that is later used in game, and there are done some pathing caluclations over that version of heightmap represantion, that was not touched by gadgets (completely changing shape/heightmap of final map). |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-08 21:18 | abma | New Issue | |
2013-02-08 21:20 | abma | Note Added: 0009729 | |
2013-02-08 21:21 | abma | Note Added: 0009730 | |
2013-02-08 22:30 | jK | Note Added: 0009731 | |
2013-02-08 22:42 | Kloot | Note Added: 0009732 | |
2013-02-08 22:44 | Kloot | Note Edited: 0009732 | View Revisions |
2013-02-08 22:45 | jK | Note Added: 0009733 | |
2013-02-08 23:41 | abma | Summary | calculating pathcosts seems to be slower than with spring 91.0 => Initializing PathCache takes very long (>1 minute) |
2013-02-08 23:52 | Kloot | Note Added: 0009734 | |
2013-02-08 23:52 | Kloot | Note Edited: 0009734 | View Revisions |
2013-02-09 08:12 | jK | Note Added: 0009735 | |
2013-02-09 08:13 | jK | Note Edited: 0009735 | View Revisions |
2013-02-09 11:05 | Kloot | Note Added: 0009736 | |
2013-02-09 11:05 | Kloot | Note Edited: 0009736 | View Revisions |
2013-02-09 11:06 | Kloot | Note Edited: 0009736 | View Revisions |
2013-02-09 11:09 | Kloot | Note Edited: 0009736 | View Revisions |
2013-02-09 11:12 | Kloot | Note Edited: 0009736 | View Revisions |
2013-02-09 12:10 | abma | Note Added: 0009737 | |
2013-02-09 12:19 | abma | Note Edited: 0009737 | View Revisions |
2013-02-09 12:51 | Kloot | Note Added: 0009738 | |
2013-02-09 13:42 | jK | Note Added: 0009740 | |
2013-02-09 13:43 | jK | Note Edited: 0009740 | View Revisions |
2013-02-09 13:45 | jK | Note Edited: 0009740 | View Revisions |
2013-02-09 13:46 | jK | Note Edited: 0009740 | View Revisions |
2013-02-10 12:21 | Kloot | Assigned To | => Kloot |
2013-02-10 12:21 | Kloot | Status | new => assigned |
2013-06-03 00:45 | abma | Relationship added | related to 0003832 |
2013-06-03 00:48 | abma | Relationship replaced | has duplicate 0003832 |
2013-06-03 08:56 | abma | Note Added: 0010822 | |
2013-06-04 05:07 | PepeAmpere | Note Added: 0010825 | |
2013-06-04 13:24 | jK | Note Added: 0010829 | |
2013-06-04 19:42 | PepeAmpere | Note Added: 0010832 | |
2014-01-08 03:07 | Kloot | Changeset attached | => spring develop 9954f41d |
2014-01-08 03:07 | Kloot | Status | assigned => resolved |
2014-01-08 03:07 | Kloot | Resolution | open => fixed |