Norman Vine wrote:

This should work fine, the only thing I am worried about is that it seems
as if every sub component of FGFS is passing a double dt in both the
initialization and the update function.  Then locally storing a double
elapsed
variable to compare against.  This is fine but begins to constitute a fair
amount of overhead and is not the way most asynchronous sytems work.
FGFS has a fairly efficient global event queue mechanism already and we
should probably be thinking about transfering *all* time dependent
operations
to use it instead.  This is a bit more abstract method of doing these things
but is common practice in real time systems and no more abstract then
say the 'properties'.   In fact the event queue implementation predates the
'properties' but was probably not fully appreciated when the practice of
passing an explicit 'dt' was first adopted.

I don't think we have reached the point where the explicit passing of 'dt'
mechanism is causing a performance hit yet, but eventually it will as more
and more components adopt the scheme.

Note that with the event queue scheme an update function is not even
called until it's time as arrived.

I was thinking about the same lines when implementing it.
I believe it is the third time I've implemented something similar for FlightGear. :-)


Erik



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

Reply via email to