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.

DarkBASIC Professional Discussion / Weird result! Skipping secondary render to boost speed.

Author
Message
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 28th Aug 2014 00:46
Hello, fellows!

I have a heavy 3D secondary render (picture in picture) which is not needed to be rendered on every loop, so I made a simple odd/even check.

Result:
Everything on = speed (fps) ~100%
PiP for every second loop = speed ~150%
PiP for every third loop = speed ~75%

???

Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Aug 2014 00:58
Hard to say really without seeing the code. Are the speed differences reproduceable across multiple compiles and maybe a reboot? Could something else running or not running in the background be affecting it?

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 28th Aug 2014 01:02 Edited at: 28th Aug 2014 01:30
I will try to write a quck demo that will recreate the issue.

Update: Quick demo gave me the boost according to this diagram:


Not so efficient boost at 1/10.

But my "big" code may contain logical error that do this fps loss at 1/3. Meh.

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2014 13:59
Are you doing something like,

if thisLoop && 3 ...

Looks like you have a pretty reasonable curve there. Now can you do the calculus to work out the best rate?

Formerly OBese87.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 28th Aug 2014 18:06
So skipping works fine, there is something wrong with my code.

I think I should make a benchmark from my code with dynamic loop skipping to get best speed-vs-visuals score.

Login to post a reply

Server time is: 2026-07-05 17:32:48
Your offset time is: 2026-07-05 17:32:48