Property Tree Performance

From FlightGear wiki
Revision as of 14:17, 25 February 2017 by Hooray (talk | contribs) (→‎Background)
Jump to navigation Jump to search
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