Why is XTA slow (unplayable)?

Why is XTA slow (unplayable)?

Hearken back to the days of yore and enjoy the first major Spring module!

Moderators: Moderators, Content Developer

Hermuld
Posts: 20
Joined: 28 Apr 2012, 14:38

Why is XTA slow (unplayable)?

Post by Hermuld »

XTA is unplayable for me&Ciracon since some versions, it runs so slow. What has been added lately and how to turn it off? It isn't Spring cause BA runs ok (like XTA used to). For some version Kloot showed me how to turn some new shiny effects off, dunno if it should be done again with newer versions, or it might be something else.

Don't say paste log.txt cause someone checked it and there is nothing.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

test old xta versions until you find one that runs bad but where previous runs good.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Why is XTA slow (unplayable)?

Post by Jools »

Also try with /luaui disable and also with /cheat and /luarules disable to see it that helps. If that helps, then the raeson is one or several of widgets or gadgets.
User avatar
PepeAmpere
Posts: 589
Joined: 03 Jun 2010, 01:28

Re: Why is XTA slow (unplayable)?

Post by PepeAmpere »

I think it is problem of current engine bad LOS defaults. Check mantis:

http://springrts.com/mantis/view.php?id=3880
http://springrts.com/mantis/view.php?id=3833#c10894

last XTA modrules.lua

Code: Select all

  sensors = {   
    requireSonarUnderWater = true,  -- defaults to true
    los = {
      losMipLevel = 2,  -- defaults to 1
      losMul      = 1,  -- defaults to 1
      airMipLevel = 4,  -- defaults to 2
      airMul      = 1,  -- defaults to 1
    },
  },
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

LOS settings are same as BA and hermuld wrote BA does not lag for him.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Why is XTA slow (unplayable)?

Post by Jools »

I don't think anything in XTA has been changed what could cause those lags. Maybe it's the fact that BA has been improved, the rumours say that for example advanced playerslist widget has been made 50% better in terms of lag propensity.

Latest XTA has a debug button, enable it and you will see how much lag is caused by gadgets and what gadgets.
Hermuld
Posts: 20
Joined: 28 Apr 2012, 14:38

Re: Why is XTA slow (unplayable)?

Post by Hermuld »

I tested xta versions with -nocost.
9.725 good
9.726 good
9.727 good
9.728 good
9.729 unplayable slow - starts to lag when I start building an airlab - nothing else but commander and lab nanoframe on screen.


SUGGESTION:
Someone please put up an autohost which hosts 9.728 OR rename 9.728 to 9.730 and upload it.

Helium rehosts 9.729 automatically when someone changes to older version (autoupdate).
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

thanks for testing.
starts to lag when I start building an airlab
Before it is ok? Also make sure you are not testing with an AI ingame because it with /nocost it might build tons of things in seconds or generally cause lag. Use NullAI or "Player only: Testing Sandbox"

I will make post on how to give more detailed information with gadget profiler etc..
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

1) Describe the lag.
Is it just literally 0 fps and spring freezes up?
Does it go from smooth fps to less smooth fps?
Does it run smooth then stops, then smooth again, then stops etc.
With chat command /fps you can see FPS.

1b) When does it lag?
Always (even when commander spawns and you do nothing)?
Only when you look at units?
When units shot? etc
When doing something (like building airlab) makes it lag, what happens if you undo it? (like selfd the airlab)

2) Use same map for all tests.
I suggest map "Aliendesert" because it is small and has no problematic features like tons of laggy bushes or whatever.

2) Upload infolog.txt
of the game where it lagged. If you can, also of game where it did not lag, to compare.
2b) Upload springsettings files. At top of infolog.txt it tells you where to find it.
For example: "Using configuration source: "C:\Spiele\spring-94.1\springsettings.cfg" (might be more than one file)

3) Debug screen
Ingame, press alt+b or type into chat: /debug
Some startrek looking thing appears, should look like this:
http://www.abload.de/img/debug_monitor08uno.jpg

Make a screenshot when it lags and upload.


4) Lua profiler
For this you have to the modoption debugmode to 1.
Can do this with in singleplayer of springlobby for example:
http://www.abload.de/img/debug_modep3ubj.jpg
Now ingame it should look like this:
http://www.abload.de/img/debug_mode_ingamek5ubj.jpg
Unlike me, do not resize screenshots so that text remains readable

5) LuaUI\config\XTA.lua
Rename that file to blabla.lua
If that fixes the lag, upload the file.
Do not simply delete it because then nobody can figure out anymore what evil was inside.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

http://pastebin.com/Bmv5daMp chatlog

so for HermuldSuuri:
-com standing or moving = NO LAG
starting construction of building = LAG
once construction is finished or cancel= NO LAG
screenshot of debug:
http://imgur.com/WtR6hKQ
shows 43 fps but he says actually "it is like 1 frame 1 sec"

Making 2nd unit of same type: LAG
Spawn unit with /give: LAG
Spawn a FEATURE with /give arm_zeus_dead: NO LAG
/give arm_zeus: NO LAG
building dragoon teeth with Commander: NO LAG

Supposedly when it lags, it goes to low FPS for 4 seconds, then to normal.

There was no time to test debug or gadget profiler.
---

Conlussion:
Was already helpful in showing that it not just "always lag" but only in same cases.

Since spawning features or mobile unit did not lag, it might be something related to:
-factory script?
-pathing/yardmap?

Need to test spawning more units and see which ones make it lag.

[16:20:43] <[CoW]HermuldSuuri> athlon 64 QL 64, ATI radeon HD4570 512MB, 4Gt RAM, win vista 32
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Why is XTA slow (unplayable)?

Post by Jools »

Testing with spring 94.1 and xta 9.728 and 9.729:
Map: Alien desert
AI: NullAI

Testing procedure:

Give 50 airlabs, let each construct an Freedom Fighter, monitor FPS during process. FPS depends on zoomlevel and a lot of things, this is the minimum zoom level where you can see what all factories are building (variies probably with settings).

Results:

XTA 9.728:

FPS is at about 120 when all factories are selected. When they all start nanolathing, FPS drops to about 60, when FF:s are complete FPS goes back to 120.

XTA 9.729:

Exactly the same thing: FPS stabilises at 120 before the building starts (with all factories selected, along with the exit routes and way points; with no selection fps is at about 180), it then drops to about 60 when factories are nanolathing, then goes back to about 120 after construction ends.

There is one widget that causes FPS drop in this process, it's Build ETA - XTA. Disabling that causes the FPS to only drop to about 75 during the construction phase. But note there were 50 factories building.

Widget profiler during nanolathe phase (XTA 9.729):

Link to screenshot A

Widget profiler during no nanolathe phase (XTA 9.729):

Link to screenshot B

Note that the fps shown in screenshot doesn't correspond to the reported ones: the widget profiler widget itself decreases fps.

Concerning gadgets, I had to test with XTA SVN version to get gadget profiler working. During the nanolathe phase, the Production Rate gadget is the most expensive one on fps.

Gadget profiler on nanolathe phase (XTA SVN version):

Link to screenshot C

Conclusions:

There is obviously an fps drop caused by the nanolathing process, but with this setup there is no difference between XTA 9.728 and 9.729 (or svn).

The most expensive widget in this phase is Build ETA - XTA. The most expensive gadget is Production Rate. But the question is how often the real game fps is limited by a lot of units being nanolathed and not other stuff. Nonetheless, those widgets and gadgets could probably be improved.

So note that this setup may not be representative of real game play, I just wanted to test the nanolathe thing. Other tests may be needed to test other hypotheses :)

My config:
Intel E6600 Core Duo (Conroe) @ 2,4 GHz, FSB: 266 MHz
RAM 4 Gb DDR2, 400 MHz, 6-6-6-28-24
GPU Nvidia GTX 460 (ForceWare 311.06), 1 Gb
Spring run from SSD drive connected to eSata port.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

Yes, that nicely shows how to find most cpu-using widget/gadget.
Sadly on your computer there is no lag anyway (60 FPS is still very smooth) so there is not much else to see from it.
---

In chat kloot said these possible causes:
-"nanoframes rendered in software mode" - But then building dragon teeth with commander should lag too, which it does not. (for hermuld)

-"unitscript semi infinite loop" - Must test more units (buildings, factories?) to figure out which ones lag.
Also needs screenshots of the debug menus and infolog.
Maybe make testmod where arm_aircraft_plant has an empty script.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

Yesterday's games/testing:

Cirakon:
said XTA 9.729 for him lags but in testing could not show it.
We only found one bug that made him lag, but that bug makes it lag for everybody and seems to be somewhat rare: http://springrts.com/phpbb/viewtopic.php?f=48&t=30855 Humping Lag.

Facit:
Nobody could confirm that 9.729 lags more than 9.728 (which was praised for lagging less)
We also played big games (5v5 and 2v2v2v2v2) without lag problems.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Why is XTA slow (unplayable)?

Post by Jools »

Yes, that's the main finding. But I also found that you can double or triple the fps by disabling these widgets:

- Healthbars
- Ghost Radar
- Ghost Site
- Advanced playerslist (may be already fixed by dnw in svn version, needs testing)
- RedUI Drawing
- RedUI Framework
- Build ETA (only relevant when building a lot of things at the same time)

So while we can't do anything about engine related code, this is something we can do something about. Possibly.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

Yes, but none of those widgets cause UNPLAYABLE fps drop. (like is the title of this thread)
- RedUI Drawing
- RedUI Framework
Having just those enabled is useless anyway: They are just helpers for other widgets like "Red Resource bars" etc.
So with disabling those you actually disable many other widgets, too.
Personally I use none of the RedUI widgets.
- Advanced playerslist
The /info default one is less disruptive (smaller) and shows ping+cpu better. I dont see the advantage of it.
Hermuld
Posts: 20
Joined: 28 Apr 2012, 14:38

Re: Why is XTA slow (unplayable)?

Post by Hermuld »

The problem is solved for me, this helped:

disablemapdamage=1

with this cmd 9.729 runs as well as 9.728 on my comp (is playable).
We tested today with Ciracon.
User avatar
Deadnight Warrior
Posts: 183
Joined: 08 Jun 2009, 17:59

Re: Why is XTA slow (unplayable)?

Post by Deadnight Warrior »

Jools wrote:Yes, that's the main finding. But I also found that you can double or triple the fps by disabling these widgets:

- Healthbars
- Ghost Radar
- Ghost Site
- Advanced playerslist (may be already fixed by dnw in svn version, needs testing)
- RedUI Drawing
- RedUI Framework
- Build ETA (only relevant when building a lot of things at the same time)
Adv. Playerslist is already done on SVN, Ghost Radar as well (not much improvement though, 15% max under rather synthetic conditions), for Ghost site I couldn't do anything. Never cared about RedUI as it was always a performance hog.

Every other widget typically consumes less than 0.5% of CPU consumed by LuaUI, so not really performance killers.

Local sound gadget on the other hand (which is active by default in test mode) can eat up to 90% CPU (Spring total) when you have Pyros rampaging around (or any other flamethrower weapon) so make sure you're not running with that gadget enabled.
Hermuld wrote:The problem is solved for me, this helped:

disablemapdamage=1
That affects all Spring games, not just XTA, basicaly you disable re-pathing the map (since there's no terrain damage that can change it, and construction terraforming happenes a lot less than explosion damage), which has profounding impact on game performance. This is most likely the reason why BA runs fine on your computer but XTA doesn't. 99% of BA weapons don't damage terrain, so re-pathing is very fast.
Last edited by Deadnight Warrior on 25 Aug 2013, 16:12, edited 1 time in total.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why is XTA slow (unplayable)?

Post by knorke »

I forgot to mention this..
Cirakon wanted disablemapdamage=1 in yesterdays games, but in the 2v2v2v2v2 we forgot to set it. It still worked.

So maybe for Hermuld it is grounddeformation of buildings that trigger repath or something?
screenshots of alt+b would show it i think.
[16:20:43] <[CoW]HermuldSuuri> athlon 64 QL 64, ATI radeon HD4570 512MB, 4Gt RAM, win vista 32


----
local sound gadget does SetWatchWeapon for every weapon ever and does ProjectileCreated for every projectile ever. I think exploded pieces rom units, too. http://code.google.com/p/xta-springrts/ ... cal.lua#89
No wonder that this could be expensive. Imo should be default off.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Why is XTA slow (unplayable)?

Post by Jools »

knorke wrote: local sound gadget does SetWatchWeapon for every weapon ever and does ProjectileCreated for every projectile ever. I think exploded pieces rom units, too. http://code.google.com/p/xta-springrts/ ... cal.lua#89
No wonder that this could be expensive. Imo should be default off.
It is default off (for that reason).

You have to watch projectiles if you are going to be able to tell if they are in or out of LOS.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Why is XTA slow (unplayable)?

Post by FLOZi »

S44 does SetWatchWeapon for machineguns and Explosion() for each MG bullet (and there are more than shown, actual bullets are invisible and we emit tracers) without any issues.
Post Reply

Return to “XTA”