C2025-011 PROMS – RO Update Admin Tool Memory Enhancements
The purpose of this upgrade is to improve the user experience when using the Admin tool to Update ROs. Currently for larger RO dbs (like Barakah) we can run up against memory constraints that do not allow all the ROs to be updated at one time. This is based upon some initial resource where some places were identified where we could improve memory usage. Some of these should benefit PROMS as a whole while others will be specific to the RO Update option in Admin Tools.
This commit is contained in:
@@ -200,6 +200,7 @@
|
||||
this.txtResults.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.txtResults.Size = new System.Drawing.Size(489, 473);
|
||||
this.txtResults.TabIndex = 4;
|
||||
this.txtResults.TextChanged += new System.EventHandler(this.txtResults_TextChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@@ -312,6 +313,7 @@
|
||||
this.txtProcess.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.txtProcess.Size = new System.Drawing.Size(291, 375);
|
||||
this.txtProcess.TabIndex = 5;
|
||||
this.txtProcess.TextChanged += new System.EventHandler(this.txtProcess_TextChanged);
|
||||
//
|
||||
// pbProcess
|
||||
//
|
||||
@@ -340,7 +342,7 @@
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 23);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.panel3.Padding = new System.Windows.Forms.Padding(6);
|
||||
this.panel3.Size = new System.Drawing.Size(291, 79);
|
||||
this.panel3.TabIndex = 2;
|
||||
//
|
||||
@@ -353,7 +355,7 @@
|
||||
this.pnlLater.Enabled = false;
|
||||
this.pnlLater.Location = new System.Drawing.Point(6, 23);
|
||||
this.pnlLater.Name = "pnlLater";
|
||||
this.pnlLater.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.pnlLater.Padding = new System.Windows.Forms.Padding(6);
|
||||
this.pnlLater.Size = new System.Drawing.Size(279, 37);
|
||||
this.pnlLater.TabIndex = 3;
|
||||
//
|
||||
@@ -484,7 +486,7 @@
|
||||
this.sideNavItmExit});
|
||||
this.sideNav1.Location = new System.Drawing.Point(0, 0);
|
||||
this.sideNav1.Name = "sideNav1";
|
||||
this.sideNav1.Padding = new System.Windows.Forms.Padding(1, 1, 1, 1);
|
||||
this.sideNav1.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.sideNav1.Size = new System.Drawing.Size(385, 525);
|
||||
this.sideNav1.TabIndex = 3;
|
||||
this.sideNav1.Text = "sideNav1";
|
||||
@@ -501,7 +503,7 @@
|
||||
this.sideNavPanel4.Location = new System.Drawing.Point(81, 31);
|
||||
this.sideNavPanel4.MinimumSize = new System.Drawing.Size(0, 493);
|
||||
this.sideNavPanel4.Name = "sideNavPanel4";
|
||||
this.sideNavPanel4.Size = new System.Drawing.Size(300, 493);
|
||||
this.sideNavPanel4.Size = new System.Drawing.Size(299, 493);
|
||||
this.sideNavPanel4.TabIndex = 27;
|
||||
//
|
||||
// swDeleteFolder
|
||||
@@ -572,7 +574,7 @@
|
||||
this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.myTVdel.Location = new System.Drawing.Point(0, 126);
|
||||
this.myTVdel.Name = "myTVdel";
|
||||
this.myTVdel.Size = new System.Drawing.Size(300, 367);
|
||||
this.myTVdel.Size = new System.Drawing.Size(299, 367);
|
||||
this.myTVdel.TabIndex = 34;
|
||||
this.myTVdel.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck_DelAnn);
|
||||
//
|
||||
@@ -585,7 +587,7 @@
|
||||
this.btnDeleteItems.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnDeleteItems.Location = new System.Drawing.Point(39, 98);
|
||||
this.btnDeleteItems.Name = "btnDeleteItems";
|
||||
this.btnDeleteItems.Size = new System.Drawing.Size(221, 23);
|
||||
this.btnDeleteItems.Size = new System.Drawing.Size(220, 23);
|
||||
this.btnDeleteItems.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.superTooltip1.SetSuperTooltip(this.btnDeleteItems, new DevComponents.DotNetBar.SuperTooltipInfo("Process Deletions", "", resources.GetString("btnDeleteItems.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
|
||||
this.btnDeleteItems.TabIndex = 35;
|
||||
@@ -649,7 +651,7 @@
|
||||
this.warningBox5.CloseButtonVisible = false;
|
||||
this.warningBox5.Image = ((System.Drawing.Image)(resources.GetObject("warningBox5.Image")));
|
||||
this.warningBox5.Location = new System.Drawing.Point(17, 145);
|
||||
this.warningBox5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.warningBox5.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.warningBox5.Name = "warningBox5";
|
||||
this.warningBox5.OptionsButtonVisible = false;
|
||||
this.warningBox5.Size = new System.Drawing.Size(262, 32);
|
||||
@@ -733,7 +735,7 @@
|
||||
this.warningBox1.CloseButtonVisible = false;
|
||||
this.warningBox1.Image = ((System.Drawing.Image)(resources.GetObject("warningBox1.Image")));
|
||||
this.warningBox1.Location = new System.Drawing.Point(17, 181);
|
||||
this.warningBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.warningBox1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.warningBox1.Name = "warningBox1";
|
||||
this.warningBox1.OptionsButtonVisible = false;
|
||||
this.warningBox1.Size = new System.Drawing.Size(262, 43);
|
||||
@@ -782,7 +784,7 @@
|
||||
this.warningBox3.CloseButtonVisible = false;
|
||||
this.warningBox3.Image = ((System.Drawing.Image)(resources.GetObject("warningBox3.Image")));
|
||||
this.warningBox3.Location = new System.Drawing.Point(17, 207);
|
||||
this.warningBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.warningBox3.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.warningBox3.Name = "warningBox3";
|
||||
this.warningBox3.OptionsButtonVisible = false;
|
||||
this.warningBox3.Size = new System.Drawing.Size(264, 32);
|
||||
@@ -986,7 +988,7 @@
|
||||
this.warningBox4.CloseButtonVisible = false;
|
||||
this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image")));
|
||||
this.warningBox4.Location = new System.Drawing.Point(12, 264);
|
||||
this.warningBox4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.warningBox4.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.warningBox4.Name = "warningBox4";
|
||||
this.warningBox4.OptionsButtonVisible = false;
|
||||
this.warningBox4.Size = new System.Drawing.Size(264, 32);
|
||||
@@ -999,7 +1001,7 @@
|
||||
this.warningBox2.CloseButtonVisible = false;
|
||||
this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image")));
|
||||
this.warningBox2.Location = new System.Drawing.Point(12, 302);
|
||||
this.warningBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.warningBox2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.warningBox2.Name = "warningBox2";
|
||||
this.warningBox2.OptionsButtonVisible = false;
|
||||
this.warningBox2.Size = new System.Drawing.Size(264, 43);
|
||||
|
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
@@ -10,7 +8,6 @@ using System.IO;
|
||||
using Volian.Controls.Library;
|
||||
using DevComponents.DotNetBar;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using Volian.Controls.Library;
|
||||
using System.Linq;
|
||||
|
||||
namespace VEPROMS
|
||||
@@ -342,6 +339,8 @@ namespace VEPROMS
|
||||
pbProcess.PerformStep();
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
ClearCache();
|
||||
}
|
||||
|
||||
Application.DoEvents();
|
||||
@@ -389,6 +388,23 @@ namespace VEPROMS
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
//C2025-011 RO Update Admin Tool Memory Enhancements
|
||||
//Clear what we can from the cache
|
||||
//runs after each section
|
||||
private void ClearCache()
|
||||
{
|
||||
txtProcess.AppendText("Reclaiming memory used during previous sections.");
|
||||
|
||||
PartInfo.ClearPartInfoCache();
|
||||
ItemInfo.ClearItemInfoCache();
|
||||
Item.ClearItemCache();
|
||||
ContentInfo.ClearContentInfoCache();
|
||||
GridInfo.ClearGridInfoCache();
|
||||
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
//C2022-028 check for Bad RO Links - we will check all of the RO links found in procedure step text
|
||||
//B2022-144 Allow to check individual procedures for bad RO links
|
||||
private void CheckROLinks()
|
||||
@@ -1002,6 +1018,9 @@ namespace VEPROMS
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
//C2025-011 RO Update Admin Tool Memory Enhancements
|
||||
//clear the list since no longer using it
|
||||
myItems.Clear();
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
@@ -1088,6 +1107,7 @@ namespace VEPROMS
|
||||
}
|
||||
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess);
|
||||
//ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, null);
|
||||
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
|
||||
}
|
||||
|
||||
@@ -1976,7 +1996,20 @@ namespace VEPROMS
|
||||
pil.Add(myProcedures[tn]);
|
||||
return pil;
|
||||
}
|
||||
}
|
||||
|
||||
//C2025-011 RO Update Admin Tool Memory Enhancements
|
||||
private void txtProcess_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//clears the stack to help with memory - should never need to undo text changes to this.
|
||||
txtProcess.ClearUndo();
|
||||
}
|
||||
|
||||
private void txtResults_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//clears the stack to help with memory - should never need to undo text changes to this.
|
||||
txtResults.ClearUndo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user