My question is about the performance implications of reading application configuration data from an XML file.
I am creating an application that displays information from a database and needs to know how to display lists, depending on the types of data returned.
This is hard to explain, but basically I would like to have an XML configuration file that lists the types and describes how to display them. This will allow me to change the display methods without recompiling the application.
My question is really about performance. Given that my application will have to reuse this data during the loading of each page ...
- Do I have to read directly from the XML file and parse it every time I need it?
- Or should I cache the XML object and parse it every time I need it?
- Or do you need to parse the XML once, create some kind of object and cache this object?
My guess is option 3, but I'm mainly looking for best practices around this.
Thanks.
source share