Took out memory garbage collection call that was significantly slowing down printing.
Added a forced memory garbage collection call after editing a table
This commit is contained in:
parent
d874371f44
commit
e9b3cd91e2
@ -2622,7 +2622,6 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void FindLinks()
|
private void FindLinks()
|
||||||
{
|
{
|
||||||
//int oldRegexCacheSize = Regex.CacheSize;
|
|
||||||
string str = Text;
|
string str = Text;
|
||||||
_LinkLocations = new List<LinkLocation>();
|
_LinkLocations = new List<LinkLocation>();
|
||||||
MatchCollection matches = Regex.Matches(str, @"<START](.*?)[[]END>", RegexOptions.Singleline);
|
MatchCollection matches = Regex.Matches(str, @"<START](.*?)[[]END>", RegexOptions.Singleline);
|
||||||
@ -2637,9 +2636,6 @@ namespace Volian.Controls.Library
|
|||||||
match.Value, matchrtf.Index, matchrtf.Length, thisLink);
|
match.Value, matchrtf.Index, matchrtf.Length, thisLink);
|
||||||
_LinkLocations.Add(thisLink);
|
_LinkLocations.Add(thisLink);
|
||||||
}
|
}
|
||||||
//Regex.CacheSize = 0;
|
|
||||||
GC.Collect(); // there is a memory leak in Regex this fixes it.
|
|
||||||
//Regex.CacheSize = oldRegexCacheSize;
|
|
||||||
}
|
}
|
||||||
private LinkLocation FindBetweenLinks()
|
private LinkLocation FindBetweenLinks()
|
||||||
{
|
{
|
||||||
|
@ -2421,6 +2421,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.GetCellRange(e.Row, e.Col).Style.ForeColor = Color.Black;
|
this.GetCellRange(e.Row, e.Col).Style.ForeColor = Color.Black;
|
||||||
this.AdjustGridControlSize();
|
this.AdjustGridControlSize();
|
||||||
|
GC.Collect(GC.GetGeneration(this)); // there is a memory leak in Regex this fixes it. (called in StepRTB.cs FindLinks)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the custom editor is visible, make it follow the cell being edited
|
// if the custom editor is visible, make it follow the cell being edited
|
||||||
|
Loading…
x
Reference in New Issue
Block a user