Erik Hofman writes:
> Martin Spott wrote:
> > I'm about to purchase a used 8-way RS/6000. Coltish as I am I'd like to run
> > FlightGear on this machine. This won't work out as long as most of the
> > processing in FlightGear is done in a single thread because each of the
> > CPU's is not that fast.
> 
> Things that come in mind are:
> 
>   * Sound thread (should be fairly easy)
>   * FDM thread/process
>   * Maybe (just maybe) an I/O thread?
> 
> But I guess that's about it.

Personally, I'm not a huge fan of threading unless absolutely
necessary.  Threading adds a tremendous amount of complexity, it can
hide extremely subtle bugs that are extremely difficult to track down
and only show up under rare circumstances.

I saw a lot of nifty looking examples of threading in school, but once
you hit an application with the complexities of FlightGear, you have
to be *really* careful, and *really* know what you are doing, or you
end up making a *really* big mess.  That is a pretty hefty price to
pay.

We put in a *huge* amount of work into the threaded tile pager and I
spent many, many evenings staring at code, scratching my head, running
flightgear for hours trying to track down subtle, rare gotchas.

Think about this another way ... do a profile of flightgear.  I bet
you will find that the graphics rendering portion of FlightGear takes
90-95% of the entire application work load.  If you can't find a way
to split that up (which is nigh unto impossible since this is all
involving opengl which inherently resists threading without a *huge*
amount of effort and complexity[1]) then threading the other 5-10% of
the work isn't going to gain you a whole lot.

[1] The Performer scene graph has app-cull-draw threads, but you pay
the price with an very large amount of complexity, bloat, and some
performance loss for single CPU machines.  On a single CPU machine,
plib will almost always render the same model faster than performer.

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    curt 'at' me.umn.edu             curt 'at' flightgear.org
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to