>> << Constructing a DOM tree with a lot of small objects is *very* slow. >> >>
Absolutely :) >> Avoid DOM like the plague, for this kind of thing -- both on the reading- and writing-side of things. If you >> care about perf at all, at some point you're going to have to write a few lines of custom code to stream the >> XML in/out via XmlTextReader/Writer (and some sort of SAX implementation, in >> C++). I can think of one more approach that will give you better performance (although it still won't be nearly as fast as the shared memory solution): .NET remoting. Create a .DLL definining [Serializable] classes for your objects that need to be passed around, as well as interfaces for a MarshalByRef object you will implement in a small managed C++ wrapper in the 'worker' process. Use the TCP channel and binary formatter - these will probably cut no less than 80% of the overhead of the DOM tree implementation. >From your controller process, call the worker - and be sure to trap exceptions caused by Remoting when the listener side dies. Do not try to serialize or deserialize the data by yourself - instead, use the [Serializable] classes in the common assembly, and just pass them as input parameters / out parameters (or return values) to the MarshalByRef's class in the worker. Kamen =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: Guerrilla ASP.NET, 10 Nov 2003 in London and 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnet Guerrilla .NET, 8 Dec 2003, in Los Angeles http://www.develop.com/courses/gdotnet View archives and manage your subscription(s) at http://discuss.develop.com
