Property Tree Performance: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page with "{{Stub}} {{PropertyTree}} == Background == getNode("foo") and getChild("bar") consumes CPU while setFloatValue() seems to be quick.<ref>{{cite web |url = https://source...")
 
Line 7: Line 7:
   |title  =  <nowiki> Re: [Flightgear-devel] Properties benchmarking </nowiki>  
   |title  =  <nowiki> Re: [Flightgear-devel] Properties benchmarking </nowiki>  
   |author =  <nowiki> jsb </nowiki>  
   |author =  <nowiki> jsb </nowiki>  
  |date  =  Feb 25th, 2017
  |added  =  Feb 25th, 2017
  |script_version = 0.40
  }}</ref>
when writing to the property tree. Yasim creates ~250 surfaces for the CRJ700 and ~150 for the Citation II If I try to write data for those surfaces to the property tree (at FDM rate), frame delay rises rapidly, if I write more than 4 or 5 values per surface. I use getNode(), getChild(), set/get*Value()<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35687746/
  |title  =  <nowiki> Re: [Flightgear-devel] Properties benchmarking </nowiki>
  |author =  <nowiki> jsb </nowiki>
  |date  =  Feb 25th, 2017
  |added  =  Feb 25th, 2017
  |script_version = 0.40
  }}</ref>
That seems to be about the I/O speed of the property tree. Don't do it at FDM rate for starters, do it only as fast as you actually need and stagger the process.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35687855/
  |title  =  <nowiki> Re: [Flightgear-devel] Properties benchmarking </nowiki>
  |author =  <nowiki> Thorsten Renk </nowiki>
   |date  =  Feb 25th, 2017  
   |date  =  Feb 25th, 2017  
   |added  =  Feb 25th, 2017  
   |added  =  Feb 25th, 2017  
Line 21: Line 40:
   |script_version = 0.40  
   |script_version = 0.40  
   }}</ref>
   }}</ref>


== References ==
== References ==
{{Appendix}}
{{Appendix}}

Revision as of 14:17, 25 February 2017

This article is a stub. You can help the wiki by expanding it.

Background

getNode("foo") and getChild("bar") consumes CPU while setFloatValue() seems to be quick.[1]

when writing to the property tree. Yasim creates ~250 surfaces for the CRJ700 and ~150 for the Citation II If I try to write data for those surfaces to the property tree (at FDM rate), frame delay rises rapidly, if I write more than 4 or 5 values per surface. I use getNode(), getChild(), set/get*Value()[2]


That seems to be about the I/O speed of the property tree. Don't do it at FDM rate for starters, do it only as fast as you actually need and stagger the process.[3]


Property name lookups are slow, there are some tricks to optimise that we could do, especially using a global hot cache. This would also allow an easy way to fix problem cases, by taking the hottest entries and fixing their call sites to cache the node. The first thing, however, is extending the existing unit test to do some basic benchmarking of reads & writes, and name lookups. And then the same but in the presence of narrow and broad listeners. [4]

References

References