[GRASS5] [bug #4356] (grass) d.m: d.rast.num fails when called from 'Add comand layer'

Hamish hamish_nospam at yahoo.com
Tue May 2 02:47:05 EDT 2006


> > I notice rendering is fairly quick off screen, quite slow on screen.
> > (e.g fliping to a different workspace speeds it up 100x)
> > For me calling from gis.m seems to be 100x slow...
> 
> d.rast.num call R_flush() once per character. Ouch.

removed in CVS, thanks. Much faster now.

> For the PNG driver, that call causes the image to be written out if it
> has been modified (which, in this case, it will be; one more character
> has been drawn).
> 
> For the X driver, it "clears" the window (i.e. fills it with the
> background pixmap, onto which everything is drawn). I suspect that the
> X server may defer the filling operation if the window isn't visible.
> 
> Fix: remove the R_flush() call from the bottom of draw_number(); it's
> completely gratuitous.
> 
> Modules should only call that function once a sequence of drawing
> operations have completed and no further operations will occur for an
> indefinite period (e.g. until the user interacts via the mouse or
> terminal).
> 
> Actually, any use of that call in a d.* module is either gratuitous,
> or indicates an interactive module which need to be changed or
> replaced as part of the GUI project.

[display]$ grep -rI R_flush *
d.colors/get_info.c:    R_flush() ;
d.colors/interact.c:        R_flush() ;
d.geodesic/plot.c:    R_flush();
d.histogram/main.c:     R_flush();
d.linegraph/linegraph.c:    R_flush ();
d.linegraph/linegraph.c:    R_flush ();
d.path/select.c:                R_flush();
d.path/select.c:                R_flush();
d.path/select.c:        R_flush();
d.profile/What.c:   R_flush();
d.rast/display.c:    R_flush() ;
d.rhumbline/plot.c:     R_flush();
d.text.freetype/main.c:         R_flush();
d.text.freetype/main.c: R_flush();
d.what.vect/flash.c:    R_flush();
d.what.vect/flash.c:    R_flush();



Hamish




More information about the grass-dev mailing list