Improve ROFst Update Performance
Add RoFstLookup Dicitonary Entries for Multiple Return Values AddByROFstIDImageIDs - Add a list of figures based upon a List of ImageIDs Fix regular expression to find RO Text to replace GetDROUsagesByROIDs - get a list of ROUSages for a list of ROIDs GetJustRODB - Get Just RODB object without children GetJustROFst - Get Just ROFst or ROFstInfo object without children Reduce duplicate gets of RODB and ROFst Improve ROFst Update Performance GetByRODbIDNoData - Get RoImageInfo objects without graphic data for ROFst Update comparison GetROUSagesByROIDs - Get a list of ROUSages by ROIDs. This reduces the number of ROIDs to be checked when updating ROFst. Use GetJustRoFst and GetJustRoDB to improve the performance to see if the "Update ROFst" button should be active.
This commit is contained in:
@@ -91,9 +91,9 @@ namespace VEPROMS.CSLA.Library
|
||||
private DocVersionInfo _DocVersionInfo;
|
||||
public ROFSTLookup(ROFst rofst)
|
||||
{
|
||||
_ROFst = rofst;
|
||||
_ROFst = rofst;
|
||||
_ROFstInfo = null;
|
||||
using (ROFstInfo rfi = ROFstInfo.Get(_ROFst.ROFstID))
|
||||
using (ROFstInfo rfi = ROFstInfo.GetJustROFst(_ROFst.ROFstID))
|
||||
{
|
||||
_DocVersionInfo = rfi.docVer==null?null: DocVersionInfo.Get(rfi.docVer.VersionID);
|
||||
}
|
||||
@@ -135,10 +135,16 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string cvalue = null;
|
||||
string ovalue = origROFst.dicRos[key].value;
|
||||
if (dicRos.ContainsKey(key)) cvalue = dicRos[key].value;
|
||||
if (dicRos.ContainsKey(key))
|
||||
cvalue = dicRos[key].value;
|
||||
if (cvalue == null && cvalue != ovalue)
|
||||
delList.Add(key);
|
||||
else if (cvalue != ovalue) modList.Add(key);
|
||||
else if (cvalue != ovalue)
|
||||
{
|
||||
// Value Change
|
||||
modList.Add(key);
|
||||
//Console.WriteLine("RO{0}\t\"{1}\"\t\"{2}\"", key, cvalue, ovalue);
|
||||
}
|
||||
}
|
||||
return modList;
|
||||
}
|
||||
@@ -414,6 +420,13 @@ namespace VEPROMS.CSLA.Library
|
||||
tmp.value = tmpg.value;
|
||||
tmp.appid = tmpg.appid;
|
||||
tmp.roid = TableID.ToString("X4") + tmp.ID.ToString("X8");
|
||||
// Add dictionary entries for children
|
||||
if (tmp.children != null)
|
||||
{
|
||||
foreach (rochild child in tmp.children)
|
||||
if(!dicRos.ContainsKey(child.roid))
|
||||
dicRos.Add(child.roid, child);
|
||||
}
|
||||
dicRos.Add(tmp.roid, tmp);
|
||||
if (!dicRosIntIDs.ContainsKey(tmp.ID)) dicRosIntIDs.Add(tmp.ID, tmp);
|
||||
int j;
|
||||
@@ -523,7 +536,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
lstRoValues = new List<string>();
|
||||
DictROVar = new Dictionary<string, string>(); // set up a dictionary of RO defined Variables
|
||||
string tmp = _DocVersionInfo==null?roval:ProcessRO(_DocVersionInfo.ProcessDocVersionSpecificInfo(roval), false);
|
||||
string tmp = ProcessRO(_DocVersionInfo==null?roval:_DocVersionInfo.ProcessDocVersionSpecificInfo(roval), false);
|
||||
if (lstRoValues.Count == 0) // was not a multiple return value
|
||||
lstRoValues.Add(tmp);
|
||||
return lstRoValues;
|
||||
|
Reference in New Issue
Block a user