Hello,
In our project we are doing the following operation to speed up the process of upload and reading of MPP files.
STEP 1: We take the uploaded MPP convert it to aspose project and set the project as baseline.
Aspose.Tasks.License tasksLicense = new Aspose.Tasks.License();
tasksLicense.SetLicense(“Aspose.Total.lic”);
var testFile = @"\600Tasks.mpp";
Project projectPlanNew = new Project(testFile);
projectPlanNew.SetBaseline(BaselineType.Baseline);
STEP 2: Take the baseline project and save it to XML so that we can serialize XML to byte array and save it in database.
projectPlanNew.Save(@"\Test1.xml", SaveFileFormat.XML);
string xmlString = System.IO.File.ReadAllText(@“E:\Work\Sample\TestMPP\TestMPP\LIB\Test1.xml”);
var projectXMLStringToByteArray = XmlSerializeToByteArray(xmlString);
var projectByteArrayToString = XmlDeserializeFromByteArray(projectXMLStringToByteArray);
XmlDocument projectPlanXMLDoc = new XmlDocument();
projectPlanXMLDoc.LoadXml(projectByteArrayToString);
projectPlanXMLDoc.Save(@"\Test2.xml");
During this process the file size is huge based on the number of tasks. For a 600 task mpp file (1MB) the xml converted file after project baseline is around 428MB.
If we do not do baseline the file size is somewhere around 2MB.
This is causing lot of performance issue in the application as every time we need some data from the Project byte array we will need to deserialize this file and get the data.
Please help!!
NOTE: Sample mpp file and code used is attached for your reference.