Script Execution & Screen Refresh Time

Posted By: feature_creature

Script Execution & Screen Refresh Time - 03/17/04 05:58

I was working on some physics stuff and I kept running my work in windowed mode -- my script execution time stays at about 1.3-9 ms depending on how many entities I've got spawned and so on -- I'm fine with this rate. The screen refresh time is listed as 0.0-0.1 ms in windowed mode.

When I run the same thing in fullscreen mode -- my script execution time jumps to 13-14 ms but does not change depending on the number of entities I've got spawned. The window refresh time is 0.0 in fullscreen mode here.

Then I noticed something strange (maybe someone else has as well), as I tried to pin down which function was taking all the time, I commented out the most time consuming function and suddenly my script execution time went to nearly zero, but my screen refresh time went to 12-13 ms in full screen mode. In windowed mode my script execution time went to 0, but my screen refresh time went to .7 seconds.

Is it possible that the engine is putting screen refresh time into the bucket for script execution? It seems that it makes it awfully hard to debug if it is...

Any help or insight would be greatly appreciated.


Posted By: feature_creature

Re: Script Execution & Screen Refresh Time - 03/19/04 10:12

Bump.

I'm thinking that there may be a bug in the timing system but before I commit to that I want to know if I'm missing something.

Thanks,
Creature
Posted By: Templar

Re: Script Execution & Screen Refresh Time - 03/25/04 07:03

hi, what did you find out?


Posted By: feature_creature

Re: Script Execution & Screen Refresh Time - 03/26/04 13:09

Nada!

Here is my guess about what is going on.

Screen refresh is happening largely in the video hardware while the script execution is happening on the cpu: so you have some parallel processing going on and it is difficult to time these separately. So, I'm guessing that whichever routine returns first gets to be nearly 0, while the other when gets the rest of the time. This would be necessary if all the debug times have to add up to the actual time between frames -- if you time parallel processes the total time would come out too high.

Yeah -- I think parallel processing explains it but the manual should probably explain this when it describes the debug output.

Posted By: Templar

Re: Script Execution & Screen Refresh Time - 03/27/04 01:39

hmmm, that sounds reasonable - I'd love to see some reaction from Conitec though...
© 2024 lite-C Forums