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.

Dark GDK / Code slower with DBSDK than with DBPro! (And another bug)

Author
Message
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 9th Oct 2005 21:18
Hi,

I was testing this issue, that Zealous posted at the DBPro forum:

- Objects with high ID (=object number) run SLOWER that objects with low ID.

I translated his sample code, and the numbers:

LOW ID:
DBPro = 1200 FPS
DBSDK = 320 FPS

HIGH ID:
DBPro = 80 FPS
DBSDK = 70 FPS

Here are the code samples:

DBPro:


And DBSDK:



Am I doing something "wrong"? If not, why DBSDK is slower? Also, I think that the high ID issue should be fixed. That is a strange behaviour, isn't it?
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 10th Oct 2005 10:55
I haven't tested this but one reason for the slow down may be that you are in debug build. Are you compiling in release mode?
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Oct 2005 11:06
I get a steady 250 fps for 2 to 100 and around 27 fps for the 100002 to 100100

Certainly seems to be a problem there...

I suspect all objects, sprites etc etc are created using a link list - and the program has to iterate 100002 times to get to the correct node...

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Oct 2005 12:30 Edited at: 10th Oct 2005 17:57
Release mode.

I use the default project that Sarcasm Stealth Squad left here:

http://forum.thegamecreators.com/?m=forum_view&t=44482&b=22

(gratefully )

Which compiles in release mode, and "all optimisations have been activated".
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Oct 2005 18:43 Edited at: 10th Oct 2005 18:48
I've done some more testings, there is an "*" marking the fastest results:

-----------------------------DBPro-----------DBSDK
------------------------------------------------------
dbMakeObjectCube-------250 fps*----------20 fps
dbMakeObjectSphere-------50 fps*----------25 fps
dbMoveObject------------1500 fps--------2700 fps*
dbLoadObject---------------14 fps*---------11 fps
dbLoadImage----------------65 fps*---------45 fps
dbTextureObject----------1360 fps--------2250 fps*
dbInstanceObject---------1200 fps*--------300 fps
dbCloneObject-------------200 fps*---------25 fps
dbMakeLight-------------1275 fps*--------750 fps
dbDotProductVector3----1280 fps--------2000 fps*

What can I say? That 7 of every 10 commands are faster in DBPro? I guess that would be too hard.
I hope that this is some kind of "Windowed-Full Screen" stuff, but I cannot make DBSDK run faster...
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Oct 2005 19:51
Those results are weird - can you make the code availiable ?

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Oct 2005 20:24
It is just like the code above, replacing the command tested, nothing special, you know:

Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 10th Oct 2005 22:07
What compiler are you using and can you show us your project settings.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Oct 2005 22:17 Edited at: 10th Oct 2005 22:18
Yes, I get the same thing on my home machine.

I've included my project.

I'm using VS 2003 .Net

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Oct 2005 22:58
Of course,

VS.NET 2003
DXSDK 9.0c August 2005
DBSDK 1.1.1 beta
Windows XP Pro
AMD 3000XP
ATI Radeon9700Pro

I downloaded Sarcasm's project and my settings are the same except:


compiler command line:


linker command line:


Tell me if you want anything else
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Oct 2005 23:06
Wonder if my idea is correct or not ?

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 10th Oct 2005 23:41
if it's anything like ODE, then yeah it's probably using pure STL with quite large structures. again if it's like ODE though, it'll be a pain to change it.

i have some ideas on how to change it, but probably best talked over with mike and seeing the actual render code.
have a feeling there's no strip-listing going on...

common technique I learnt about a year ago where you use slightly more memory but force lists to only update when required rather than constantly running through larger data chunks.

So you'd have

Render <-> Que <-> Object List

The Que would strip the pointer to the Object List when an Object is being added to be rendered, it would only remove said object when it's being deleted from the object list (aka invalid pointer) or when it's hidden.

I mean I would think something like this was already in use, but things like this would suggest they aren't yet.

OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Oct 2005 00:02
It probably isn't in order to keep things 'simple'

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 11th Oct 2005 00:11
These results are really disappointing, and I've been looking at this product a lot lately. Hopefully they can figure out what's causing the slow down.

The best audio plugin for DarkBASIC Pro!
Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Oct 2005 11:13
Apparently Mike will be looking at this after 5.9

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 11th Oct 2005 21:10
Wow. Strange results. For the first example I get:
LOW ID:
DBPro = 890 FPS
DBSDK = 193 FPS

HIGH ID:
DBPro = 47 FPS
DBSDK = 34 FPS
That was in windowed mode 640x480. Why is DGDK somuch slower than DBPro?

My signature has been erased by me because it's LARGE.
Thank you for the votez!1!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Oct 2005 23:46
Odd, isn't it ?

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 12th Oct 2005 10:28
I cannot replicate any of these things. Are you using the standard version of VS .NET 2003?
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th Oct 2005 10:54 Edited at: 12th Oct 2005 11:21
Visual Studio 2003 Profession - V7.1.3088
Hotfix KB830348 (GDI+ update)

I think, for the example above, it may have something to do with dbInstanceObject - or rather the creating process.

Remove the dbInstanceObject and it goes fast - put it back in, and it all slows down - likewise delete dbDeleteObject and it all goes slow...

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 12th Oct 2005 12:06
Mike, do you mean that you don't get those results?

I have here VS2003.net enterprise edition V7.1.3088.
I thought that there was no update (hotfix KB830348? Uh).

As Sarcarsm points, the slowdown seems to be only with certain commands.
About the numbers above, it is true that every dbMake/Clone/Instance/LoadObject test was associated with a dbDeleteObject command after it. Also dbLoadImage had dbDeleteImage, as dbMakeLight had dbDeleteLight, so in every loop a certain number of objects/lights/images were created and deleted.

To be fair, I'd bet that most of the commands are faster with DBSDK, but I want to know if we are doing something wrong or just some commands are slower than DBPro.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th Oct 2005 12:13
Quote: "I thought that there was no update (hotfix KB830348? Uh)."

Probably got installed because I use Word... Or something. Its not a proper VS 2003 update - just a Windows update.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Etienne
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Paris
Posted: 14th Oct 2005 06:37 Edited at: 14th Oct 2005 06:42
wowowo ... the dbpro/gdk comparison ... i'm a bit disappointed to read this , was hoping gdk was faster and right now on tests gdk is even slower ? i really hope it's a mistake of yours Morcilla also that you / we / i will be able to get things better , cause if i bought gdk for nothing whereas dbpro works faster well i'd feel that it sucks ...

Mike , which is faster gdk ? dbpro ? You've been making them you must have clues . i'm sorry to ask this here , but what is your compiler also ?

I would also add this : how could we get even fps if not better ?

Garage Creator
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Oct 2005 09:38
Its only with creating/deleting objects that there is a problem - everything else is faster.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Etienne
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Paris
Posted: 14th Oct 2005 09:43
smile then . whatever you look like dude

Garage Creator
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 22nd Oct 2005 22:47
Quote: " Its only with creating/deleting objects that there is a problem - everything else is faster."

Any idea why it´s slower? Isn´t it the same engine though? I just can´t get my head around the fact that it´s slower on those two things.

My signature has been erased by me because it's LARGE.
Thank you for the votez!1!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Oct 2005 00:29
No idea - it probably does extra checking or something.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Login to post a reply

Server time is: 2024-04-20 12:06:01
Your offset time is: 2024-04-20 12:06:01