← Prev in month
← Prev in thread
Advice: inline node editing, or not?
Hiya, I'm using the libxml2 libs for a project, and using the parser to create my 'node' tree at startup time. The choice I'm confronted with now is whether to: a) traverse the parsed tree, use an iteration to build my own datastructures (linked lists/hash tables) based on that tree, throw away the tree, and operate (functionally) on my own datastructures b) use the tree returned from xmlParseFile() indefinitely, maintaining the node list and operating directly on node properties/attributes. Option a) is workable - I can go ahead and build all the intensive datastructures that I need to, from a parsed tree, and then throw away the tree - but there are some headaches with this approach. Option b) would be preferred, even if it is RAM hungry, because then I can focus on other aspects of my app without having to deal too much with back-end maintenance of my lists and hashes, not to mention that it is really a nice idea to be able to operate directly on XML-ized datasets (easy to edit!). Also, it is good for persistence, because I can then just save the trees and don't need to re-build them from scratch out of my own datastructures. But, I'm concerned that this may not necessarily be an efficient approach, or at least I may run into problems with performance. Does anyone have some advice for me as to the pitfalls of each approach? -- ; Jay Vaughan r&d>>music:technology:synthesizers - www.access-music.de/ *
← Prev in month
← Prev in thread