Norman Vine writes:

 [about SGPropertyNode::getPath]

 > >Inside the main loop, it's used only for things like interactive
 > >display in the property browser or through a network interface.  It's
 > >getStringValue where the slowdowns happen (we were talking about that
 > >at the same time).
 > 
 > I wish that were true..
 > 
 > but see
 > FGViewMgr::update (double dt)

There's no call to SGPropertyNode::getPath in there, at least not that
I can find.  There are a lot of string ops, but I'm not sure how often
they're triggered.

 > and IMO  props.cxx  parse_path() is a still a time sink
 > but I guess most consider it a worth while one

parse_path isn't all that efficient, but the good news is that it's
triggered only once for each path from each node.  i.e., the first
time I do

  double foo = node->getDoubleValue("bar/foo");

parse_path is triggered; every subsequent time, it's a simple
hash-table lookup.  If you are seeing any slowdowns, they'll be coming
from SGPropertyNode::hash_table, so that's a good place to start for
optimizations.


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

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

Reply via email to