Search

Module: Editor

Version: 5.0.0 +

User: Developer

Level: Advanced

Introduction
When reading xml files using XmlNodes and XmlFields, Futurama holds it contents in cache depending on external items that influence the xpath queries.

Prerequisites
- Familiar with Futurama XmlNode and XmlField

 



  

 

About Xml caching

When Futurama reads xml in an XmlNode, the original document is completely loaded in memory to evaluate the xpath queries as described by the developer. This reading is initiated by the value of an XmlField being used in a Formula or other external object within the document structure. Only the top-level XmlNode uses this caching mechanism (and all children, both XmlNodes and XmlFields, reuse this cache).

Memory usage for these documents is (related to the actual data that they contain) high. Typically, an xml-document of 1mb will result in 8mb memory usage by Futurama. Preferrably, you would like to clear this memory as soon as the actual data you need to get out of these files is queried for (by XmlField objects).

This is however only possible if:

1. All children have 'static' xpath queries

This means both XmlField and XmlNode children should only depend on the parent XmlNode. If an Xpath query depends on an external item in the document structure, this might lead to changing values of the xpath, and thus reevaluating the XmlField or XmlNode. To guarantee an acceptable performance, the complete xml document is kept in cache by Futurama.

2. the XmlNode itself is not referred to by other items in the document structure

If an external item refers to the XmlNode, its string representation is kept in cache by Futurama.

Manage memory usage by XmlNodes

When using large xml-files, it might be useful to split these files in ones with data that is 'static' within the Futurama application and ones with data that is 'dynamic' (meaning that xpath queries vary during the calculation or session, which results in reevaluating these).

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2014-07-22