Replays and HD Chug

Replays and HD Chug

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Replays and HD Chug

Post by Argh »

Heyas... just tested my game with the newest build, and I noticed immediately that my HD is writing a LOT of data all the time. It causes weird pauses in the game, among other issues. However, when I looked at the final data file, it's only 1.4MB in size...

I assume that this is because of the savegame feature. Is it really supposed to be slowing the game to a crawl a lot?

Furthermore, I noticed that every time I selected a builder menu, or switched menus within a builder, the HD made lots of "I'm writing data" noises, and also slowed up the game a bit. The same happened every time I selected a new Unit, which is weird, since everything's supposed to be pre-loaded, so Spring shouldn't be going back to the HD for data during the game, right?

So, is it the new code for getting and writing the AI states that's causing this? Or something else that was broken, is now working, but is having unexpected side-effects? Sorry to whine about all of this, but meh... you should've seen it- occasionally the game would just halt for a second or two, then resume as if nothing had happened, over and over again.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Post by Auswaschbar »

Heyas... just tested my game with the newest build, and I noticed immediately that my HD is writing a LOT of data all the time.
I cant confirm this
I assume that this is because of the savegame feature. Is it really supposed to be slowing the game to a crawl a lot?
The savegame feature wont touch your hd until you gave command to save
Furthermore, I noticed that every time I selected a builder menu, or switched menus within a builder, the HD made lots of "I'm writing data" noises, and also slowed up the game a bit. The same happened every time I selected a new Unit, which is weird, since everything's supposed to be pre-loaded, so Spring shouldn't be going back to the HD for data during the game, right?
I noticed this too, but this bug seems to have disapeared mysteriously last week. Sure you use rev3883?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Code: Select all

open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/CentralBuildAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/EconomyAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/MetalMakerAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/MexUpgraderAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/RadarAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/ReportIdleAI.so", O_RDONLY) = 25
open("/home/tobi/wd/taspring/trunk/game/AI/Helper-libs/SimpleFormationAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/CentralBuildAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/EconomyAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/MetalMakerAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/MexUpgraderAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/RadarAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/ReportIdleAI.so", O_RDONLY) = 25
open("/opt/spring/lib/spring/AI/Helper-libs/SimpleFormationAI.so", O_RDONLY) = 25
This happens each time selection changes, this would probably explain it. Though it is not writing anything all the time, just reading. (O_RDONLY)

Not everything is supposed to be preloaded btw, Spring still lazy loads units and models and stuff: if your unit is only used very late game then it's model, COB, and, if S3O, texture, is only loaded very late game.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

This happens each time selection changes, this would probably explain it. Though it is not writing anything all the time, just reading. (O_RDONLY)
1. I'm using build 3881. I'll test with 3883 when it's available as a complete build. The builds have proven to be a godsend, because I don't have to rebuild and check dependencies and basically rebuild Spring every time I want to test things, so I'm simply using them, and thus am two builds behind current.

2. Whatever's going on, it seems to be reading a lot more data than is necessary. I know this isn't a scientific measurement, or whatnot, but I can hear my HD access quite clearly, and the access lasts for a good quarter-second to a half-second- that's enough time for enormous amounts of data to be pulled up.

At any rate, I'll test again when 3883 is available, and report back.

As for the lazy-load thing... yeah, I know that it doesn't load the model / skin up, sorry for posting unclearly.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Argh: are you using an antivirus...?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Yes, I'm using an antivirus. And guess what? If I shut it off, then this goes away :?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Oho! I've found what's doing this! It's something in the KAI released with this build of Spring! I'll see if another version is available...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ok, this is bizarre! I've finally cured this, and this is what did it: I put the pagefile back onto a secondary drive! I dunno why this cured it, but meh, who cares.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Wha?

Is your other harddrive faster? Do you lack RAM and need your page file?

O__o

This is a weird problem. I had a sort of "click, pause, click, pause again" thing when I had all the lua installed. Deletion of said lua returned my game to normal.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think its because now hes removed a bottleneck in his first HD, and hs spread the load between two Hadrdrives
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Post by YokoZar »

Argh wrote:Ok, this is bizarre! I've finally cured this, and this is what did it: I put the pagefile back onto a secondary drive! I dunno why this cured it, but meh, who cares.
Then something is screwy with the memory management, degrading performance. Perhaps it was the virus scanner.
Post Reply

Return to “Engine”