Le 21/12/2010 04:11, jhliu 劉錦浩@hinet a écrit :
Dear Maurice Sir,
I tried the test program on my another Fedora machine, that's a 2.93GHz Core 2 Dou E7500 CPU with nVidia GeForce 7050 graphics card, but the result is also much slower than yours too:
- First GrBitBltNC for copy screen context to bufgrc: 0.04 secs
How do you measure that ? time for a single copy is too short, and presumably fooled by overheads. I had introduced the x1000 loop and the GetUnixTimes in the opposite GrBitBlt to have significant measures.
- 1000 times GrBitBltNC to copy bufgrc back to screen: 10.27 secs.
This seems reasonable: I measure 3 secs for the same GrBitBlt with the xwin driver (2.5 secs with the sdl driver) (and your gw gh nc values below). This gives 3 milliseconds for a single copy from buf to screen. Seems OK ? The refreshing time for the screen is usually between 60Hz and 100Hz.
But I have the following changes compares to yours:
- The GrSetDriver is changed to GrSetDriver('win32 gw 1024 gh 768 nc
65536'), that creates a bigger window and color depth that I will need.
my 3 secs is for these parameters. win32 (the mingw driver) should be replaced by xwin for X11, but this is unimportant because GrSetDriver falls back to the default driver (xwin under X11) when not finding win32.
From my test, it is about 3X slow down than GrSetDriver('win32 gw 640 gh 480 nc 256');
for win32 in my case I go from 0.1 millisec to 3 millisec for xmin, I go from 0.8 millisec to 3 millisec: basically same as yours
I'm guessing, is the problem comes from the difference of djgpp/mingw/X11 ?
for me DJGPP/VESA is much slower than X11 and X11 is somewhat slower than mingw (but it is on a different computer, accessed through a VNC) I suppose that you are directly on your computer: with a xterm it is catastrophically slow.
Maurice