Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: different iso drawing algorithms
Home

[Freeciv-Dev] Re: different iso drawing algorithms

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: different iso drawing algorithms
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 13 Dec 2002 17:47:42 +0100

On Fri, Dec 13, 2002 at 06:51:33AM -0500, Jason Short wrote:
> On Fri, 2002-12-13 at 06:31, Raimar Falke wrote:
> > On Fri, Dec 13, 2002 at 10:35:53AM +0100, Raimar Falke wrote:
> > >     Using a mask with gdk_draw_pixmap doesn't slow gdk_draw_pixmap down.
> > 
> > this and the statement "the iso code only doubles the number of calls
> > of some functions in the worst case but on most functions the number
> > of calls are the same as in the iso case" leaves me which the big
> > question: why is the iso-mode slower by factor 30?
> 
> Using the blending mask on tiles definitely slows things down - these
> sprites are not drawn at all in non-iso mode.  The blending mask means
> we only need half as many tiles in the tileset, but there is extra
> overhead in drawing.

Lets test this claim. The following is produced with the attached
patch:

non-iso
2: 288 calls with 457200 pixels total; time=0,597000ms
2: 288 calls with 457200 pixels total; time=0,602000ms
2: 288 calls with 457200 pixels total; time=0,588000ms
2: 288 calls with 457200 pixels total; time=0,593000ms
2: 288 calls with 457200 pixels total; time=0,620000ms
2: 288 calls with 457200 pixels total; time=0,596000ms

iso
2: 1120 calls with 1824256 pixels total; time=85,693000ms
2: 1120 calls with 1824256 pixels total; time=96,866000ms
2: 1120 calls with 1824256 pixels total; time=89,169000ms
2: 1120 calls with 1824256 pixels total; time=78,136000ms
2: 1120 calls with 1824256 pixels total; time=89,115000ms
2: 1120 calls with 1824256 pixels total; time=78,570000ms
2: 1120 calls with 1824256 pixels total; time=92,389000ms

call factor: 3.88
pixel factor: 3.99
time factor: 141.66 = (85/0.6)

The first two were expected in this range. This also invalidate the
claim that the iso mode has to draw larger sprites.

The third is bad. Any explanation for this?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "A common mistake that people make, when trying to design 
  something completely foolproof is to underestimate the 
  ingenuity of complete fools."
    -- Douglas Adams in Mostly Harmless

Attachment: time_gdk.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]