Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd May 2013 03:17
Hi all, so my game is QUITE large (takes about 7 minutes to compile the EXE on my high-end Alienware development machine) but with my large playerbase I've noticed a strange anomaly...

If I make a build and send it out, I'll have people compliment on how fast the game runs, but then I'll recompile and send out a new build - even if I've changed NO code - and send a new exe out, but this time the game will run slow for people. Same code. No changes, just a recompile...

Anyone else seen this happen? Anyone have any knowledge of how it could be avoided?


Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 22nd May 2013 04:56 Edited at: 22nd May 2013 04:58
Data/Instruction alignment can cause all kinds of hiccups in programs. But before going down that road you'd need to check the two builds are actually different. Make a little program to load both into mem blocks can compare the data.

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 22nd May 2013 05:56
Absolutely a byte by byte comparison would be the definitive answer on whether there is actually a compiler issue, in the situation you described.

As for remedies, try turning off your antivirus or setting it to exclude the file or folder the game is inside of. There are a number of existing known compiler issues involving antivirus programs. Secondly try compiling on a fresh cold boot of the computer.

If this fails, create a debug version of the game or a debug menu that tracks timing from all of your major internal code sections. If you can reproduce the effect yourself, it will help you isolate where the problem is. Even if you can't explain why some code section is slow, you can usually rewrite things to negate the effect.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2013 11:50
I'm a bit puzzled. If you've made no changes why are you sending out a new build? Or are you just doing this for testing purposes because of a suspected issue? Does it sometimes go the other way?

Otherwise I agree with the previous two posters: do a byte by byte check of the two "identical" builds. Should be easy using one of the DOS commands (well it used to be anyway ).

Quote: "Secondly try compiling on a fresh cold boot of the computer."


That's always a good idea when weird things start happening. It would be annoying though if that just gave you the slow-running version.
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 22nd May 2013 14:05
Just so you don`t feel alone I can confirm this is the same for me and has been occuring for quite some time
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd May 2013 14:20
@Green_Gandalf - I was doing it for a test, as between builds I'd have people complain that the new build is slower, or praise it for being faster, when all I'd done was put out a hotfix that included a new in-game book (just referencing a new external file). So I thought I'd run some tests without changing ANYTHING, and it still happened!

Thanks for the tips, guys. I might give it a try and see. And James, it's good to know it's not just me!


Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2013 14:47
@James H

Have you tried keeping a copy of both exe files and comparing them byte by byte? It would be interesting to know the outcome. Sounds like something to keep an eye on.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 22nd May 2013 14:58
Quote: "Have you tried keeping a copy of both exe files and comparing them byte by byte? It would be interesting to know the outcome. Sounds like something to keep an eye on. "


Quote: "all I'd done was put out a hotfix that included a new in-game book (just referencing a new external file)"


I think his latest comment reveals that he is making changes to the code, at least in some small insignificant way. This would make a byte by byte comparison utterly useless.

I'll fall back to my original suggestions. Compare the timing of all major code sections and isolate the slowdown.

James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 22nd May 2013 16:26
@ Green Gandalf
Same size as I hadn`t altered any code just kept a copy of previous exe, for me it seems to occur when I run the exe from same file rather than a different compile - when I`ve compiled from IDE it seemed that way but it was just the same exe all along. Occurances are undpredictable and when I checked GPU temp it was high. So probably something to do with my comp rather than dbp, think I need new graphics card
Michael P
20
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 22nd May 2013 17:44 Edited at: 22nd May 2013 17:47
I think its pretty unlikely that compiling alone is causing this issue. Isn't compiling deterministic? Also, as far as I know DBP is a pretty simple compiler without alot of funky optimizations so I wouldn't expect a small change to trigger a bunch of inefficiencies elsewhere.

It could be that resources are not properly deallocated on exit so e.g. some graphics card memory is left occupied on the graphics card for a while. So therefore running twice in succession causes slow down on the second run.

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd May 2013 18:35
Mage, at first the code builds were different, yes, but when I noticed the problem I did identical compiles (with no code changes) and there were still differences in performance.

I'll do a byte-by-byte compare next time I see it happen (as it doesn't happen always) and see if I can narrow it down. It's definitely the compiler doing something funny.


Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2013 23:37
Quote: "So probably something to do with my comp rather than dbp, think I need new graphics card"


Quote: "I think its pretty unlikely that compiling alone is causing this issue."


Quote: "I'll do a byte-by-byte compare next time I see it happen (as it doesn't happen always)"


Do I see a pattern emerging?


Quote: "It's definitely the compiler doing something funny."


Is it? I think we need some specific evidence of this.

On my machines there's often other background tasks going on without my knowledge (TuneUp scans, Norton scans, Windows update checks, etc, etc) and these always seem to be doing something just when I'm trying to do a performance test of some sort.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 23rd May 2013 01:24
Not to mention the antivirus can and is likely to be scanning the files and memory of the compiler and compiling during the whole process.

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 24th May 2013 07:43
But that's still the compiler doing something funny It's just that it's something else CAUSING the compiler to act funny.

As someone who works with Visual Studio in their day job, I kind of expect compilers to just reliably compile...

But I'll nurse it a bit and do a compare and see what happens.


Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 24th May 2013 09:06 Edited at: 24th May 2013 09:08
Quote: "But that's still the compiler doing something funny It's just that it's something else CAUSING the compiler to act funny."


In the back of my mind, I imagine the antivirus accessing one of the temporary files the compiler generates before compiling is finished. It causes a file access issue, perhaps something isn't written, or the compiler can't access the file at the right time. Then rather than the whole compile failing, some sort of fallback code is used, or an optimization is omitted. The compilers behavior changes slightly.

That being said, maybe it isn't the antivirus at all.

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th May 2013 09:14
Sounds more like the instruction alignment isn't optimal, which can kill performance.

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th May 2013 07:54
It's worth checking the antivirus, though... As well as anything else that might be running the background.... If I find anything definitive I'll post it here for posterity.


Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th May 2013 00:02
Quote: "for posterity"


And for clarity, I hope.

Login to post a reply

Server time is: 2026-07-07 02:17:47
Your offset time is: 2026-07-07 02:17:47