* Melchior FRANZ -- Friday 29 June 2007:
>   http://members.aon.at/mfranz/ai.nas  [1.7 kB]
> 
> It's a bit faster, too, although 8.7 seconds for EHAM/parking.xml
> is still a lot (was 12.8 before).

And that comes from bad Nasal code, not from the c(++) expat/EasyXML
parser code, which is very fast. Fixed in $FG_ROOT/Nasal/io.nas.

Reading "EHAM/parking.xml", parsing and converting to property tree:

  Before --> 9.015211 s
  Now    --> 0.619772 s

Placing the models still takes several seconds, and I'm afraid I
can't do much here. We'll see ...


What the bad Nasal code was, you ask? Using size(n.getChildren("foo"))
to determine the index of the next "foo" node to generate. That's
the standard way of doing it, but in a case like mine where I don't
add to an unknown node dir, but generate *all* of the nodes myself,
anyway, I can just count them. A lot faster.  :-)

What we learn: don't use props.Node.getChildren() if avoidable. 

m.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to