Strange Render Speed Up

Blitz3D Forums/Blitz3D Userlibs/Strange Render Speed Up

Apocalypse(Posted 2005) [#1]
I was working on a brightness control function for my Userlib when I noticed something very odd when timing it's speed. When my program initially starts, the processing loop takes about 150ms (720x480 Image on 3Ghz P4), but after about 10 seconds, the loop time goes down to 45ms.

Has anyone else noticed this behavior? Is there something going on with Blitz's Render Engine, like some self optimization?

Any takers? Here is the source code...



You can download the userlib here from my worklog..

http://www.blitzbasic.com/logs/userlog.php?user=7138&log=440


Apocalypse(Posted 2005) [#2]
I hate replying to my own posts but.. :)

OK, I forgot FreeImage and that pretty much stableizes the routine at 150ms.

Now the question is, why do the ms go down when I leave out FreeImage but the routine still works? (Although memory is probably leaking like water over a cliff! :/)


Mustang(Posted 2005) [#3]
It might be just initializing stuff and texture upload to the card? It's common knowledge that starting any complex 3D game can cause slowdowns until the card has all the stuff it needs... in-game texture etc swapping isn't so massive so it does not cause slowdowns. There are also techniques called "warming up the card" like rotating a camera in game world 360 before showing anyting on screen. But your code is pretty simple so it might not be the case here.


KuRiX(Posted 2005) [#4]
Perhaps some kind of auto cache...