Game Development Community

1.4 RC2 Slowdown?

by Eric Roberts · in Torque Game Engine · 09/09/2005 (8:48 pm) · 5 replies

I've been playing around with RC2 recently - and the most significant change I've seemed to notice is a dramatic degredation in performance. I'm using standard TGE - no lightpack, nothing. I was kinda put back by this since in Ben's .plan he mentioned a lot of speed increases...

Here's a portion of the output of the build from VC7:

------ Build started: Project: dtsSDK, Configuration: Debug Win32 ------

Compiling...
vc7fix.cpp
DTSShape.cpp
...
DTSBrushMesh.cpp
...
Creating library...

Build log was saved at "file://c:\Torque\Sdk\lib\out.VC7.DEBUG\dtsSDK\BuildLog.htm"
dtsSDK - 0 error(s), 40 warning(s)


------ Build started: Project: Torque Tool Lib, Configuration: Debug Win32 ------

Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Compiling...
lang.cc
...
abstractPolyList.cc
vc7fix.cpp
Compiling resources...
Creating library...
LIB : warning LNK4068: /MACHINE not specified; defaulting to X86
zlib_DEBUG.lib(adler32.obj) : warning LNK4006: _adler32 already defined in lpng_DEBUG.lib(adler32.obj); second definition ignored
...
zlib_DEBUG.lib(zutil.obj) : warning LNK4006: _z_errmsg already defined in lpng_DEBUG.lib(zutil.obj); second definition ignored
winWindow.obj : warning LNK4006: _main already defined in lpng_DEBUG.lib(pngtest.obj); second definition ignored

Build log was saved at "file://c:\Torque\Sdk\lib\out.VC6.DEBUG\engine\BuildLog.htm"
Torque Tool Lib - 0 error(s), 74 warning(s)

------ Build started: Project: map2dif plus, Configuration: Debug Win32 ------

Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

Build log was saved at "file://c:\Torque\Sdk\tools\out.VC6.DEBUG\map2dif plus\BuildLog.htm"
map2dif plus - 0 error(s), 1 warning(s)


------ Build started: Project: langc, Configuration: Debug Win32 ------

Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

Build log was saved at "file://c:\Torque\Sdk\tools\out.VC6.DEBUG\langc\BuildLog.htm"
langc - 0 error(s), 1 warning(s)


------ Build started: Project: Torque Demo, Configuration: Debug Win32 ------

Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Performing Custom Build Step
Compiling...
lang.cc
...
vc7fix.cpp
Compiling resources...
Linking...
LINK : LNK6006: program database c:\Torque\Sdk\engine\out.VC6.DEBUG\torqueDemo_DEBUG.pdb missing; performing full link
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

Build log was saved at "file://c:\Torque\Sdk\engine\out.VC6.DEBUG\BuildLog.htm"
Torque Demo - 0 error(s), 1 warning(s)


---------------------- Done ----------------------

Build: 16 succeeded, 0 failed, 0 skipped

Lots of little warnings and funny little library problems? Could this be the reason for the major slowdown?

- Eric

#1
09/09/2005 (9:20 pm)
You're building a debug version. Of course it will be slow! It's doing a LOT of sanity checking every frame. Try switching to Release.
#2
09/10/2005 (4:16 pm)
I'm pretty sure I've always been working with my debug builds. Has their been extra debug related overhead added to 1.4RC2? Maybe the new unicode stuff added?

Saying that - it does run much better in a release mode with the example.

It does NOT - however run with my current example... it keeps on complaining that it can't find my main.cs file...

I'm investigating it right now - it seems to be having difficulty with the new Unicode stuff put in (it works with the non-unicode code version) - and more specifically with File::open in winfileio.cc. I'm not quite sure why it's messing up - it creates a Unicode string, and then maybe tries to open with with the non-unicode version of CreateFile (CreateFileA)... ?

But why MY main.cs... ;( It works fine with the example...

I'll post a fix when I get to it.

- Eric
#3
09/10/2005 (7:37 pm)
Did you make sure that you set the debug working directory properly?

Are you sure no other debug options are enabled like TORQUE_DEBUG_GUARD or other things? Many defines, as I noted in my .plan, have had TORQUE_ prefixed to them.
#4
09/13/2005 (5:18 pm)
Just in case you were wondering I did finally manage to get everything up and running again.

Turns out that there was indeed a bug that was in my code that, get this - was in there while I was developing with 1.4 RC1, that RC2 caught. Which was really strange because I was thinking about how long it was there - and how long I got away with it being there and nothing changing...

Strange.

And yes - I can confirm that there's a very nice increase in performance. Even when I define TORQUE_DEBUG ;).

Thanks for your time

- Eric
#5
09/13/2005 (7:20 pm)
I'm always amazed at how many bugs there've been in Torque, for years, that haven't prevented people from shipping real products on the thing. No surprise you've found one in your own code. :)