2024-03-29 12:34 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004461Spring engineGeneralpublic2014-08-05 14:14
Reportersilentwings 
Assigned TojK 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version97.0.1+git 
Target Version98.0Fixed in Version 
Summary0004461: high cpu usage when PFS updates are queued
DescriptionUnit movement, just in a single player game of BA 8.00, after doing /give all and giving all a single move command, is VERY (i.e. unplayably) jerky for me in 97.0.1-23, and all versions from that up to (current latest) 97.0.1-126. I have no jitter at all in 97.0.1-20, nor in 96.0.

cleanrock suggested changing WTC (-1 or 0) and WTST values (0 or 5) but this seems to have no effect.
Steps To ReproduceStart BA 8.00, /cheat and /give all. Select all units and give a move order to the other side of the map. Zoom in and watch the aircraft (at least, for me its easiest to spot jitter by observing a fast unit move).
Additional InformationThis was originally http://springrts.com/mantis/view.php?id=4427#c13340 and abma asked for it to have its own ticket.

Let me know if I can provide any more info - I don't know what to provide.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
related to 0004482closedjK Configurable PFS update rate 
+Relationships

-Notes

~0013379

abma (administrator)

very likely https://github.com/spring/spring/commit/1e75eba71268fe756bb03eb836c0596a864aed25 introduced this

~0013380

abma (administrator)

Last edited: 2014-06-29 14:12

View 2 revisions

works: 97.0.1-20-gcd4602b
"broken": 97.0.1-23-ga3d1790
96.0: http://s28.postimg.org/6nxpntril/screen00103.png
97.0.1-23-ga3d1790: http://s10.postimg.org/b6w2ymx7d/screen00101.png

~0013381

Kloot (developer)

WAIT, WHAT? WHAT?!?!

NO PART OF 21-23 HAS *ANYTHING* TO DO WITH UNIT MOVEMENT SMOOTHING!!

~0013382

abma (administrator)

Last edited: 2014-06-29 14:32

View 2 revisions

increase of cpu usage in Unit::MoveType::Update ?!

in -21 a lot of changes were made in rts/Sim/Path/Default/:

https://github.com/spring/spring/compare/97.0.1-20-gcd4602b...97.0.1-23-ga3d1790

~0013383

silentwings (reporter)

Last edited: 2014-06-29 14:28

View 2 revisions

Yes, I skim read that commit and can't see anything that would be related either. But the observations above are always reproducible (for me, at least).

Nixtux can "reproduce" the same bug with TechA, but i haven't yet got him to check if the difference for him is between -20 and -23.

~0013384

Kloot (developer)

"increase of cpu usage in Unit::MoveType::Update ?!"

6ms --> 10ms is not enough of an increase to explain this

"in -21 a lot of changes were made in rts/Sim/Path/Default/:"

they only affect how the pathfinder calculates passability when terrain is modified...

~0013385

Kloot (developer)

silentwings: is there any difference between 96 and 97-126 with /give 500 corgator (or whichever mobile ground unit you prefer) instead of /give all?

~0013386

silentwings (reporter)

Last edited: 2014-06-29 15:29

View 3 revisions

I can't see one - i tested with corgator and corfav (corgator moves slow enough that i feel like detecting the jitters, which i can only do visually is not completely reliable, but with corfav i think they would be visible).

Using /give 500 corhurc there is a noticeable difference and obvious jitter - then it looks like the same jitter as i see with /give all.

~0013387

Kloot (developer)

Then I don't see how it can be related to 21-23: corhurc is an aircraft, hence entirely unaffected by GroundMoveType/PFS changes.

~0013388

silentwings (reporter)

Last edited: 2014-06-29 16:11

View 2 revisions

Yes, I understand. I can't see how it can be related to 21-23 either, but visually with /give all the difference between them for me is quite visible.

I could try to write a widget that measured system time, Spring.DiffTimers and gameframe, then also tracked unit position and tried to pick out moments where the movement was not smooth (e.g. by unusually low/high ||dx||). Would that help?

~0013389

Kloot (developer)

just to clarify: by "single player game of BA 8.00", do you mean started via spring.exe or the lobby?

if the latter, are you absolutely 100% sure that 21-23 introduced it for you and not 20, especially considering what was originally claimed for 19 (g0822467)?

~0013390

nixtux (reporter)

Ok checked between 97.0.1-23-ga3d1790 and 97.0.1-20-gcd4602b using TechA v2.27.3 with luaui and luarules disabled
i get jitter in the 23+ but this jitter only effects aircraft

~0013392

silentwings (reporter)

Last edited: 2014-06-29 20:37

View 3 revisions

Yes, I mean starting spring.exe directly with the "sandbox" script and BA V8.00/svn. The difference is between -20 (no jitter, like 96.0) and -23 (like current dev, with jitter) - I'm as sure as I can be from measuing something visually but I'd be much happier if I had a way of recording the jitters numerically.

I think the jitter in -19 was supposed to relate only to jitter while rejoining online games, which I'm not able to test/reproduce since BA is current running only on 96.0.

Like nix, in all that I've tested so far I only see jitter from aircraft,

~0013395

Kloot (developer)

Next question then: does the jitter disappear after giving a patrol order to (eg) 500 corhurc when "[PFS] queued updates" (lower-left corner of alt+B view) reaches 0 0? This takes a minute or so at 1x speed.

~0013396

silentwings (reporter)

Yes!! The jitter gradually improved until it was no longer there.

I tested 2 times, same results each time. At a rough guess I'd say that once [PFS] queued updates got below about 3000 0, I couldn't spot any jitters.

I tested using /give all followed by a patrol order to all (rather than /give 500 corhurc + partol order) because more jitter appeared that way and its easier to see the effect.

~0013398

Kloot (developer)

mkay, somewhat unexpected but tells me enough

~0013426

cleanrock (reporter)

Kloot, 2 weeks since you assigned this to yourself, have you forgot about it maybe ?

~0013427

abma (administrator)

... in other words, is help/more info needed?

~0013428

Kloot (developer)

no/no/no

commit will be around this weekend

~0013429

abma (administrator)

thanks for this info!

~0013439

Beherith (reporter)

Just FYI, /give all performed on uneven terrain results in a huge number of terrain changes because of the smoothing under them.

~0013454

abma (administrator)

Last edited: 2014-08-01 02:30

View 2 revisions

easy way to reproduce is to queue a lot of cheap buildings: every time a building is finished, cpu usage is high. (CPathEstimator::CalculateVertices)

+Notes

-Issue History
Date Modified Username Field Change
2014-06-29 14:01 silentwings New Issue
2014-06-29 14:01 abma Target Version => 98.0
2014-06-29 14:02 abma Note Added: 0013379
2014-06-29 14:07 abma Note Added: 0013380
2014-06-29 14:12 abma Note Edited: 0013380 View Revisions
2014-06-29 14:20 Kloot Note Added: 0013381
2014-06-29 14:22 abma Note Added: 0013382
2014-06-29 14:27 silentwings Note Added: 0013383
2014-06-29 14:28 silentwings Note Edited: 0013383 View Revisions
2014-06-29 14:32 abma Note Edited: 0013382 View Revisions
2014-06-29 14:45 Kloot Note Added: 0013384
2014-06-29 15:10 Kloot Note Added: 0013385
2014-06-29 15:26 silentwings Note Added: 0013386
2014-06-29 15:26 silentwings Note Edited: 0013386 View Revisions
2014-06-29 15:29 silentwings Note Edited: 0013386 View Revisions
2014-06-29 15:50 Kloot Note Added: 0013387
2014-06-29 16:11 silentwings Note Added: 0013388
2014-06-29 16:11 silentwings Note Edited: 0013388 View Revisions
2014-06-29 16:42 Kloot Note Added: 0013389
2014-06-29 17:01 nixtux Note Added: 0013390
2014-06-29 20:35 silentwings Note Added: 0013392
2014-06-29 20:37 silentwings Note Edited: 0013392 View Revisions
2014-06-29 20:37 silentwings Note Edited: 0013392 View Revisions
2014-06-29 21:43 Kloot Note Added: 0013395
2014-06-29 22:28 silentwings Note Added: 0013396
2014-06-29 23:43 Kloot Note Added: 0013398
2014-06-29 23:44 Kloot Assigned To => Kloot
2014-06-29 23:44 Kloot Status new => assigned
2014-07-14 17:48 cleanrock Note Added: 0013426
2014-07-14 17:56 abma Note Added: 0013427
2014-07-14 17:56 abma Status assigned => feedback
2014-07-15 04:23 Kloot Note Added: 0013428
2014-07-15 10:25 abma Note Added: 0013429
2014-07-15 10:25 abma Status feedback => new
2014-07-25 14:32 Beherith Note Added: 0013439
2014-08-01 02:18 abma Note Added: 0013454
2014-08-01 02:18 abma Status new => assigned
2014-08-01 02:18 abma Summary jitter in singleplayer after /give all and move order => high cpu usage when PFS updates are queued
2014-08-01 02:30 abma Note Edited: 0013454 View Revisions
2014-08-02 00:49 abma Relationship added related to 0004482
2014-08-05 14:14 jK Changeset attached => spring develop 9c373f2c
2014-08-05 14:14 jK Assigned To Kloot => jK
2014-08-05 14:14 jK Status assigned => resolved
2014-08-05 14:14 jK Resolution open => fixed
+Issue History