From 9b7a8ee6fa85def088f2ea284a41e71f0edf6b46 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 8 Jun 2012 18:11:54 +0000 Subject: [PATCH] Show Memory use to before and after LibDocs Remove unnecessary debug output --- PROMS/DataLoader/LibDoc.cs | 6 ++++-- PROMS/DataLoader/Procedures.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/PROMS/DataLoader/LibDoc.cs b/PROMS/DataLoader/LibDoc.cs index 765e2576..ccb0077c 100644 --- a/PROMS/DataLoader/LibDoc.cs +++ b/PROMS/DataLoader/LibDoc.cs @@ -31,7 +31,8 @@ namespace DataLoader private void MigrateLibDocs(OleDbConnection cn, string pth) { - frmMain.AddInfo("Before MigrateLibDocs\r\n{0}", VEPROMS.CSLA.Library.CSLACache.UsageAll); + // MessageBox.Show("Before LibDocs"); + frmMain.AddInfo("Before MigrateLibDocs{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll); // Get all of the library documents - the first list has the entire list of files // found within the rtffiles folder, the second list contains usages from the 'tran' // file. During processing for procedures/sections occurs, the used library documents @@ -65,7 +66,8 @@ namespace DataLoader dicLibDocRef[key] = dicLibDocSect[dr_doc["TONUMBER"].ToString().ToUpper()]; } da_doc.Dispose(); - frmMain.AddInfo("After MigrateLibDocs\r\n{0}", VEPROMS.CSLA.Library.CSLACache.UsageAll); + frmMain.AddInfo("After MigrateLibDocs{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll); + // MessageBox.Show("After LibDocs"); } private int MigrateLibDoc(FileInfo fi) { diff --git a/PROMS/DataLoader/Procedures.cs b/PROMS/DataLoader/Procedures.cs index fcc4e591..d8973482 100644 --- a/PROMS/DataLoader/Procedures.cs +++ b/PROMS/DataLoader/Procedures.cs @@ -389,14 +389,14 @@ namespace DataLoader List cachePartInfo = PartInfo.CacheList; FrItm = MigrateProcedure(cn, dr, FrItm, pth, docver, convertProcedures, activeFormat); if (FirstItm == null) FirstItm = FrItm; - frmMain.MyInfo = string.Format("Before Restore {0}", GC.GetTotalMemory(true)); + //frmMain.MyInfo = string.Format("Before Restore {0}", GC.GetTotalMemory(true)); ContentInfo.RestoreCacheList(cacheContentInfo); PartInfo.RestoreCacheList(cachePartInfo); ItemInfo.RestoreCacheList(cacheItemInfo); EntryInfo.RestoreCacheList(cacheEntryInfo); PdfInfo.RestoreCacheList(cachePdfInfo); DocVersionInfo.RestoreCacheList(cacheDocVersionInfo); - frmMain.MyInfo = string.Format("After Restore {0}", GC.GetTotalMemory(true)); + //frmMain.MyInfo = string.Format("After Restore {0}", GC.GetTotalMemory(true)); } } //GC.Collect();