Question

I am building an "Application Virtualization" product. I use XML file as a virtual registry. Virtual applications generated from my software accesses the virtual registry Xml. It runs , however runs very slow.

I load and unload the XML on every Registry API calls, because multiple process threaded from the parent access a same registry file. This may cause the application to run slow.

Can any one let me know the alternative for XML...

Was it helpful?

Solution 3

Its text to tree transformation time. I managed this in my code by Loadaing and Parsing the XML in all processes, only after a write has occured in any one of the process.

OTHER TIPS

You could use a database instead. It would be faster. Sqlite is lightweight and powerful.

If you load it into memory and operate on it from there then your problem isn't XML. Profile your application to find out where it's spending most of it's time. I think you will probably find it's spending most of it's time searching for the item you want to access.

Well, you could of course always use the real registry, which is thread-safe and fast...

Otherwise, you'd have to create a separate process that manages your virtual XML registry, keeping the XML structure in memory so it doesn't have to read/write it all the time. Then the processes that need to access it can use IPC to communicate with the registry process.

Another idea, if the multiple processes are not likely to update the registry all the time: keep your virtual XML registry in memory, and write it to disk when changed, but asynchronously via a background thread. When accessing the registry, first check whether the file has been changed; if not, you don't need to reload it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top