View Issue Details

IDProjectCategoryView StatusLast Update
0003867Spring engineGeneralpublic2013-08-02 05:12
Reporterabma Assigned Toabma  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version94.1.1+git 
Summary0003867: allow partial repathing of one square across frames for games which have many different movetypes to avoid lags
Descriptionspring heavily lags when stuff is reclaimed, one of this commits introduced it:

https://github.com/spring/spring/commit/0dad8f81d0a4a8fd1ee7d6eea07645b9e3297b7e
https://github.com/spring/spring/commit/8538573c6f10c15489015478ee9e29e879c3606f
https://github.com/spring/spring/commit/376c4d4f28836e9b4c02e78ff204c606ae75d04b
https://github.com/spring/spring/commit/8d0c2195faf0cb12c2fcfed54c8bbfd935cdff90
https://github.com/spring/spring/commit/de95c2000ff40fd83f5c7448756f1be7416a0343

it doesn't compile, so i can't get the exact commit.
TagsNo tags attached.
Attached Files
20130623_200316_AI: Proving Grounds v01_94.1.1-655-gf217d9d develop.sdf (Attachment missing)
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Relationships

related to 0003870 resolvedjK trees are not visible when created with /give treetype1 
related to 0003845 resolvedKloot Partial (possibly graphical) lag when playing 

Activities

abma

2013-06-23 19:49

administrator   ~0010912

maybe https://github.com/spring/spring/commit/0dad8f81d0a4a8fd1ee7d6eea07645b9e3297b7e (see the comment)

abma

2013-06-23 20:06

administrator   ~0010915

possible related to 0003845

abma

2013-06-23 21:22

administrator   ~0010916

either the particles or the reclaimed feature (pathfinder update) could be the cause...

PepeAmpere

2013-06-24 01:34

reporter   ~0010923

Isnt it related with this? - http://springrts.com/mantis/view.php?id=3833

abma

2013-06-24 01:37

administrator   ~0010925

not sure, here it lags when ONE feature is reclaimed... (and some CEG's? are spawned)

abma

2013-06-24 03:26

administrator   ~0010928

Last edited: 2013-06-24 03:44

/give treetype1

already causes a lag, for building units the same, even with luaui / luarules disabled.

creating / destroying a (single!) unit causes already a noticeable lag. not sure how to debug better.


it looks a bit like creating / adding to the pathfinder queue causes the lag

abma

2013-06-25 20:25

administrator   ~0010936

last comment is a different bug, see 0003873

(/give armcom causes no lag)

abma

2013-07-06 14:42

administrator   ~0010971

happens on windows for me, too

cleanrock

2013-07-07 14:29

reporter   ~0010979

i dont see any slowdown, how do u detect the "lag" ?

abma

2013-07-07 14:47

administrator   ~0010980

build a metal extractor and watch the animation.

also, use a debug2 build...

abma

2013-07-07 14:56

administrator   ~0010981

when the effect is spawned, fps drops from ~60fps to ~50fps for a short time.

abma

2013-07-07 15:06

administrator   ~0010982

maybe as note: some recent changes reduced the lag, so i'm not sure if anything needs to be changed.

abma

2013-07-07 15:15

administrator   ~0010983

hmm, as i created this bug report the fps drop was much more bigger, now its imo "ok"

abma

2013-07-14 00:47

administrator   ~0010992

aww, the lag doesn't happend with xta...

also the effect looks different. meh, sorry!

abma

2013-07-15 22:54

administrator   ~0011001

@jk:

an idea what could be the cause?

http://springrts.com/phpbb/viewtopic.php?p=544753#p544753

(and the following posts)

"it lags with /luaui disabled & /luarules disabled on ba v7.78.
it doesn't lag with /luaui disabled & /luarules disabled in xta 9.729."

jK

2013-07-15 23:08

developer   ~0011002

DEBUG2 lag by themselves.
Always test performance problems with REL* builds.

jK

2013-07-15 23:13

developer   ~0011003

you should also install perftools: http://en.wikipedia.org/wiki/Perf_(Linux)
and maybe I should publish my oprofile script for spring.

jK

2013-07-15 23:15

developer   ~0011004

Last edited: 2013-07-15 23:16

PS: one cause can be the different amount of movetypes, the thing is that when a square needs to get repathed _all_ movetypes need to be done at the same time
-> the load cannot scattered across frames

abma

2013-07-15 23:19

administrator   ~0011005

is there a mod-setting that makes the pathfinder ignore features?

this would explain why xta doesn't lag...

jK

2013-07-15 23:23

developer   ~0011006

no

abma

2013-07-16 16:10

administrator   ~0011010

ok, now im 100% sure its because of repathing. sorry, didn't know many things, this is why it took so long.

xta seems to contain much less units, so repathing is much faster in comparison to BA.

-> feature request to allow repathing of a square accross multiple frames to avoid micro lags.

jK

2013-07-16 18:26

developer   ~0011012

Last edited: 2013-07-16 18:28

count of units doesn't matter, only count of movetypes does

| -> feature request to allow repathing of a square accross multiple frames to avoid micro lags.
that would massively increase memusage cause you need then a structure for each movetype to keep track if a square was updated or not.

abma

2013-07-16 19:34

administrator   ~0011013

ok, that sounds not good.

is there an easy way to delay the start of the pathing updates for a few frames?

when a feature is destroyed (or created), mostly many events are triggered (sound, CEG effects, lua-events), which already creates a high load. delaying this would move the load to a time with possible fewer "load".

also this would allow more updates (for example because of some chain explosions) to be merged into single updates.

abma

2013-07-16 20:12

administrator   ~0011014

meh, i guess cleanest is to hack this into a thread...

abma

2013-07-17 00:10

administrator   ~0011018

# of BA movedefs: 25
# of XTA movedefs: 23

PepeAmpere

2013-07-18 00:23

reporter   ~0011024

Last edited: 2013-07-18 00:25

- so generaly huge number of movetypes can cause the starting lag (increase the repathing time)?

- i notice some lag after general pathing recalculation (i mean the one in loading screen, after massive heightmap change), too, which is running AFTER gadget terrain generator work is finished - so is this "starting lag pathing" included in genereal pathing recalculation (in loading screen) or this (this lag, issue) is some special update/event of pathing structures?

abma

2013-08-02 05:12

administrator   ~0011140

(imo this can't be fixed like suggested, only multithreading / delaying this more would help)


 - so generaly huge number of movetypes can cause the starting lag (increase the repathing time)?

yes, the more movetypes, the longer it will take on updates.

- i notice some lag after general pathing recalculation (i mean the one in loading screen, after massive heightmap change), too, which is running AFTER gadget terrain generator work is finished - so is this "starting lag pathing" included in genereal pathing recalculation (in loading screen) or this (this lag, issue) is some special update/event of pathing structures?

no, this is no special update event. when heightmap is changed, the pathing data needs to be updated. when the engine is started, the cached path is used, if a gadget changes heightmap, the pathing data has to be updated.

Issue History

Date Modified Username Field Change
2013-06-23 19:29 abma New Issue
2013-06-23 19:30 abma Description Updated
2013-06-23 19:49 abma Note Added: 0010912
2013-06-23 20:02 abma Summary lags with particles, when stuff is reclaimed => lag when features are reclaimed
2013-06-23 20:05 abma File Added: 20130623_200316_AI: Proving Grounds v01_94.1.1-655-gf217d9d develop.sdf
2013-06-23 20:05 abma File Added: infolog.txt
2013-06-23 20:06 abma Note Added: 0010915
2013-06-23 21:22 abma Note Added: 0010916
2013-06-24 01:34 PepeAmpere Note Added: 0010923
2013-06-24 01:37 abma Note Added: 0010925
2013-06-24 03:26 abma Note Added: 0010928
2013-06-24 03:33 abma Note Edited: 0010928
2013-06-24 03:41 abma Relationship added related to 0003870
2013-06-24 03:44 abma Note Edited: 0010928
2013-06-25 20:25 abma Note Added: 0010936
2013-07-06 14:42 abma Note Added: 0010971
2013-07-07 14:29 cleanrock Note Added: 0010979
2013-07-07 14:47 abma Note Added: 0010980
2013-07-07 14:50 abma Severity major => minor
2013-07-07 14:56 abma Note Added: 0010981
2013-07-07 15:06 abma Note Added: 0010982
2013-07-07 15:15 abma Note Added: 0010983
2013-07-07 15:15 abma Status new => resolved
2013-07-07 15:15 abma Resolution open => no change required
2013-07-07 15:15 abma Assigned To => abma
2013-07-10 03:40 abma Relationship added related to 0003845
2013-07-14 00:47 abma Note Added: 0010992
2013-07-15 22:54 abma Note Added: 0011001
2013-07-15 22:54 abma Assigned To abma => jK
2013-07-15 22:54 abma Status resolved => feedback
2013-07-15 22:54 abma Resolution no change required => reopened
2013-07-15 23:08 jK Note Added: 0011002
2013-07-15 23:13 jK Note Added: 0011003
2013-07-15 23:15 jK Note Added: 0011004
2013-07-15 23:16 jK Note Edited: 0011004
2013-07-15 23:19 abma Note Added: 0011005
2013-07-15 23:19 abma Status feedback => assigned
2013-07-15 23:23 jK Note Added: 0011006
2013-07-16 16:08 abma Assigned To jK =>
2013-07-16 16:08 abma Severity minor => feature
2013-07-16 16:08 abma Status assigned => new
2013-07-16 16:08 abma Target Version 95.0 =>
2013-07-16 16:08 abma Summary lag when features are reclaimed => allow partial repathing of one square across frames for games which have many different movetypes to avoid lags
2013-07-16 16:10 abma Note Added: 0011010
2013-07-16 18:26 jK Note Added: 0011012
2013-07-16 18:28 jK Note Edited: 0011012
2013-07-16 19:34 abma Note Added: 0011013
2013-07-16 20:12 abma Note Added: 0011014
2013-07-17 00:10 abma Note Added: 0011018
2013-07-18 00:23 PepeAmpere Note Added: 0011024
2013-07-18 00:25 PepeAmpere Note Edited: 0011024
2013-08-02 05:12 abma Note Added: 0011140
2013-08-02 05:12 abma Status new => resolved
2013-08-02 05:12 abma Resolution reopened => won't fix
2013-08-02 05:12 abma Assigned To => abma