need more speed

I am running an experiment in matlab using the screen function. Each
trial consists of two movies (one with moving backgroun, one without).
The code works fine but is taking about 10 seconds between trials.
I have found the section of code that slows the process down (takes
about 8.3 seconds). I am posting the code below hoping that someone
can suggest ways to make it more efficient.

for f = 1:numberOfFrames-1
%the following should occur once every frame.

imagePtr(f)=SCREEN(window,'OpenOffscreenWindow',surroundColor,rect);
%open the offscreen window (i.e., the Gworld window).
for d = 1:(numberOfBGDots + numberOfSignalDots)
rowNumber = numberOfBGDots * (f-1) + d;
r = movie1( rowNumber, (3:6)); %This selects the values in
"movie,sub,m" columns 3 thru 6 (which represent instaneous dot
position), and puts it into a variable called 'r'.
c = movie1 (rowNumber, 7); %column 7 assigns the color of the
dots
SCREEN(imagePtr(f),'FillOval',c,[r]); %Using 'FillOval' we now dump
specific dot coordinates into the OffscreenWindow (i.e., the GWorld
window).
end

SCREEN(imagePtr(f),'DrawText','.', fixationX+4, fixationY+4,
(fixationColor)); %this is the fixation point, which is a period.
end

Thanks
Candace