Index: [thread] [date] [subject] [author]
  From: Jos Hulzink <josh@stack.nl>
  To  : ggi-develop@eskimo.com
  Date: Thu, 10 Sep 1998 11:50:02 +0200 (CEST)

Re: SYNC mode should go

On Thu, 10 Sep 1998, Olivier Galibert wrote:
> Are you saying that a feature which is considered a bloat, slow things
> down badly and is probably the cause of  crashes should be in the core
> library (instead of  in a  support library)  and enabled by   default?
> What kind of   logic is that?   Do you  really want people  publishing
> benchmarks  with   "GGI  is three  times   slower  than X"   in  them?
> Especially since direct-access  framebuffers, which is what  sync mode
> emulates, is  something which  is dissepearing  from all  modern video
> hardware?
> 
My opinion: 
Speed is too important to even think about flushing every graphical
command. If the argument is used that a beginner is not known with flushing or
something, well, he has to learn the GGI-'instructionset' before he can
program anyway, so that one more command should be no problem.

One way to solve things:
ggiEnableFlushing()
ggiDisableFlushing()
i.e. the starting user has to enable flushing once, and the experienced
user forgets these commands as soon as possible. All drawing routines have
to end with something like
if (!flushingEnabled) then return; else {ggiFlush(vis); return;}

(Why in this way ? If everything goes right Gcc delivers code that won't
jump if flushing is disabled so all it costs is another compare, and the
i586 branch prediction is right (forward jump = don't jump). If the user
wants to flush, things are getting slow anyway, so another jump is not a
big issue. I think that is pretty good. (Indeed, I optimize my code by hand :) 

Another way is to provide a
completely-stupid-programmers-include-file with something like:

#define ggiFDrawLine (blah) ggiDrawLine (blah); ggiFlush (vis);

-------

Please don't sync all commands, or be prepared for getting the comment "
GGI, the slowest graphical interface ever". I thought speed was one of the
main hotspots of GGI, if that is true, I think this discussion should be
finished soon.

Hope this helps,

Jos Hulzink, josh@stack.nl


Index: [thread] [date] [subject] [author]