We are trying to create drawing documents using the saved diagram XML string in parallel threads and we found that "persistencyManager.LoadFromStream
" is blocking the thread.
It is locking the threads and making them wait to complete.
using (MemoryStream drawingStream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(drawingString)))
// now load the persistent document from the memory stream
NPersistencyManager persistencyManager = new NPersistencyManager();
drawingStream.Position = 0;
persistencyManager.LoadFromStream(drawingStream, Nevron.Serialization.PersistencyFormat.XML, null);
NDrawingDocument nDrawing = (NDrawingDocument)persistencyManager.Persistentdocument.Sections.Object;
Any idea that how can we parallelize this in an efficient way so that we can load multiple diagrams from the list of xml strings.