justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

Dropped frame % is very high #63

Open cjoynes opened 2 years ago

cjoynes commented 2 years ago

Depending on the computer, upwards of 90% of frames are being dropped when running experiments

justingardner commented 2 years ago

More specifically, if you run mglRetinotopy, it will report at the end that it has dropped frames based on how many frames it has found that have taken over 5% of the expected frame refresh time:

Average tick rate = 0.017557 56.95717Hz effective Dropped frames = 496 (45.67%) (i.e. frames >= 5.0% longer than expected)

Typically this number should be negligible, like a few (i.e. less than 10) frames at most.

You may wish to profile the run time of all the calls that are being run in the display loop for mglRetinotopy to see what is eating up the time. This issue doesn't seem to be limited to mglRetinotopy - it is similar for other stimulus code as well (e.g. mtloc). So, something is running slower than expected...