speed of gdk rectangles ; X vs Win32



Hello,
	I am porting an application that is currently based on Xlib,
basically using drawing primitives such as rectangles, lines, and text.
Since I am interested in minimal work, I have translated it directly into
gdk/glib, under Unix as well as Win32. However I find surprising differences
in
the speed of the primitives on the same machine.
By "surprising" I mean sometimes factors of 10 difference between
libraries/OS on the one machine!

The comparisons are tabulated on
 http://www.cat.csiro.au/cmst/staff/cameron/GDK/alltimes.html

I have compared Linux+Xlib, Linux+GDK (negligible difference)
cygwin+Xlib+X-server-on-PC, and Win32+gdk-native.

Naturally, I have not made things easy and directly compared similar
versions,
mainly because I want to use the stable Linux release (1.2.10),
but the Win32 libs are 1.3.0 and 1.3.10.

Does anyone have any idea why there is such a discrepancy?
Sometimes it looks like the native win-32 GDI is just slow to draw,
but sometimes it looks like the gdk implementation might be.
I wouldn't have thought solid-filled rectangles would be particularly
difficult or unusual.

On a separate, but related topic...
While looking through the archives I noticed questions (Jan 2000) about why
anyone
would want to draw lots of rectangles. I have such code: it is a finite
difference solver where results are given on a rectangular mesh.
Displaying results involves filling the screen with lots of abutting
rectangles.
As to whether XDrawRectangles should be supported along with XDrawRectangle,
I have never found a need for the plural version - the added code complexity
would not be worth it to me.

---------------------------------------------------------------------
Cameron Davidson,

CSIRO Manufacturing Science and Technology     Phone: +61 7 3327 4535
Qld Centre for Advanced Technologies           Fax:   +61 7 3327 4455
Technology Court,
Pullenvale, Qld, 4069



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]