View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004316 | Spring engine | General | public | 2014-02-22 01:09 | 2014-02-28 08:41 | ||||
Reporter | silentwings | ||||||||
Assigned To | jK | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 96.0.1+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004316: perf drop between 96.0 and 96.0.1-260 | ||||||||
Description | See videos - they are of a stress test I use (which was designed as a way to look for bugs in unit/lua scripts). Both videos are the current BA svn, with an extra gadget that runs the stress test. It places many units and gives them move/fight/patrol orders, causing a huge battle and a deliberately high lua load. One video is 96.0 and the other is 96.0.1-260. In 96.0 the test runs smoothly, fps consistently high, game speed 1.0. In 96.0.1-260, there are constant 0.5-1 sec jitters, game speed varies wildly between 0.5 and 0.8, fps also varies wildly between 1 and 60. My video capture is far from perfect, but it is easily enough to see the difference. In both videos I turned on /debug mode after about 30 secs. | ||||||||
Additional Information | I can provide a .sdz that runs the test, if needed. 96.0: http://www65.zippyshare.com/v/57540715/file.html 96.0.1-260: http://zippyshare.com/ | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
silentwings (reporter) 2014-02-22 01:09 Last edited: 2014-02-22 02:27 |
-260 is the latest version I can test with, because of http://springrts.com/mantis/view.php?id=4315. for some reason the 96.0.1-260 link didn't come out above: http://www55.zippyshare.com/v/4420545/file.html |
silentwings (reporter) 2014-02-22 11:06 Last edited: 2014-02-22 13:31 |
I've bisected this and it seems there is a very noticeable drop in performance between 96.0.1-147-ge82a681 (which runs as well as 96.0 in the video) and 96.0.1-159-g7f66476 (which is as bad as -260). There are no windows builds in between these. a few commits possible, but the big ones here are sdl1 -> sdl2 and utf8. |
jK (developer) 2014-02-22 19:07 |
When you compare your /debug output you see that -260 spend upto 84% in EventHandler::GameFrame -> that's Lua's GameFrame event |
silentwings (reporter) 2014-02-22 19:21 Last edited: 2014-02-22 19:21 |
Yes - the lua being run in each case is identical, and deliberately puts alot of stress on the engine, in gadget:GameFrame. So as far as I can see (some aspect of) lua suffered a huge performance drop between -147 and -159 ? Let me know if you want any more info/tests. |
jK (developer) 2014-02-22 19:27 |
I am pretty it doesn't run the same lua code |
silentwings (reporter) 2014-02-22 19:28 Last edited: 2014-02-22 19:30 |
Well - from the point of view of mod it is identical, although there is some random numbers generated. The .sdd used in each case is identical. I can give you a sdz of it if it would help. |
jK (developer) 2014-02-22 19:32 Last edited: 2014-02-22 19:33 |
scan the gadgets for `gadget:GameFrame` in _unsynced_ side, those weren't executed before 96+ (only when you used them in/for SendToUnsynced) |
silentwings (reporter) 2014-02-22 20:02 Last edited: 2014-02-22 20:08 |
I have checked every isntance of GameFrame in BAs gadget code and they are all within synced. Within the two tests, the only gadget code that is putting stress on the engine is the GameFrame call from the stress testing gadget; all others are negligable by comparison. This can be checked in both cases using the gadget profiler. |
jK (developer) 2014-02-23 02:42 |
then your code behaves differently between builds |
silentwings (reporter) 2014-02-23 09:45 Last edited: 2014-02-23 10:13 |
Yes - that's the problem, that's why I made a bug report. Why should the same .sdd, producing identical looking battles, run far slower with -159 and all later versions than with -147? Isn't that the definition of performance drop??! [The test is not doing anything unreasonable; it just regulates unit density across the map. It is deliberately written so as it puts a high lua load onto the engine, during a reasonable approximation to a big battle. On each frame it picks a 1x1 square of the map, finds out how many units of each team that section contains, if there are more than wanted it removes some, if less than wanted then it creates some. Every so often it picks a random unit and gives it a new order. ] |
abma (administrator) 2014-02-23 15:08 |
@silentwings: can you please provide the .sdz, else we can look into our crystal ball and guess possible problems. |
silentwings (reporter) 2014-02-23 15:47 Last edited: 2014-02-23 15:51 |
Here: http://www11.zippyshare.com/v/90226553/file.html The gadget called spam_ emulates the test. You might want to to comment out line 402, which keeps moving the camera around. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-22 01:09 | silentwings | New Issue | |
2014-02-22 01:09 | silentwings | Note Added: 0012855 | |
2014-02-22 01:10 | silentwings | Note Edited: 0012855 | View Revisions |
2014-02-22 02:27 | silentwings | Note Edited: 0012855 | View Revisions |
2014-02-22 11:06 | silentwings | Note Added: 0012859 | |
2014-02-22 13:31 | silentwings | Note Edited: 0012859 | View Revisions |
2014-02-22 18:03 | abma | Description Updated | View Revisions |
2014-02-22 19:07 | jK | Note Added: 0012867 | |
2014-02-22 19:21 | silentwings | Note Added: 0012868 | |
2014-02-22 19:21 | silentwings | Note Edited: 0012868 | View Revisions |
2014-02-22 19:27 | jK | Note Added: 0012869 | |
2014-02-22 19:28 | silentwings | Note Added: 0012870 | |
2014-02-22 19:30 | silentwings | Note Edited: 0012870 | View Revisions |
2014-02-22 19:32 | jK | Note Added: 0012871 | |
2014-02-22 19:33 | jK | Note Edited: 0012871 | View Revisions |
2014-02-22 20:02 | silentwings | Note Added: 0012872 | |
2014-02-22 20:03 | silentwings | Note Edited: 0012872 | View Revisions |
2014-02-22 20:08 | silentwings | Note Edited: 0012872 | View Revisions |
2014-02-23 02:42 | jK | Note Added: 0012877 | |
2014-02-23 09:45 | silentwings | Note Added: 0012878 | |
2014-02-23 09:47 | silentwings | Note Edited: 0012878 | View Revisions |
2014-02-23 09:59 | silentwings | Note Edited: 0012878 | View Revisions |
2014-02-23 10:10 | silentwings | Note Edited: 0012878 | View Revisions |
2014-02-23 10:11 | silentwings | Note Edited: 0012878 | View Revisions |
2014-02-23 10:13 | silentwings | Note Edited: 0012878 | View Revisions |
2014-02-23 15:08 | abma | Note Added: 0012879 | |
2014-02-23 15:47 | silentwings | Note Added: 0012880 | |
2014-02-23 15:50 | silentwings | Note Edited: 0012880 | View Revisions |
2014-02-23 15:51 | silentwings | Note Edited: 0012880 | View Revisions |
2014-02-28 08:41 | jK | Changeset attached | => spring develop 693db616 |
2014-02-28 08:41 | jK | Assigned To | => jK |
2014-02-28 08:41 | jK | Status | new => resolved |
2014-02-28 08:41 | jK | Resolution | open => fixed |