优化性能,降低GC

This commit is contained in:
monitor1394
2019-07-23 21:43:01 +08:00
parent ec35122b16
commit 00158aed82
12 changed files with 276 additions and 161 deletions

View File

@@ -80,6 +80,7 @@ namespace XCharts
}
#endif
HashSet<string> serieNameSet = new HashSet<string>();
protected override void DrawChart(VertexHelper vh)
{
base.DrawChart(vh);
@@ -89,7 +90,7 @@ namespace XCharts
float dataTotal = GetDataTotal();
float dataMax = GetDataMax();
m_AngleList.Clear();
HashSet<string> serieNameSet = new HashSet<string>();
serieNameSet.Clear();
int serieNameCount = -1;
for (int i = 0; i < m_Series.Count; i++)
{