性能优化

This commit is contained in:
monitor1394
2019-03-22 08:22:02 +08:00
parent 3b92a9b39b
commit a7eb565766
3 changed files with 16 additions and 28 deletions

View File

@@ -185,6 +185,7 @@ namespace xcharts
Vector3 toPoint = Vector3.zero;
Vector3 firstPoint = Vector3.zero;
dataPosList.Clear();
dataPosList.Capacity = seriesList.Count;
for (int i = 0; i < seriesList.Count; i++)
{
if (!legend.IsShowSeries(i))
@@ -198,7 +199,7 @@ namespace xcharts
var max = radarInfo.indicatorList[i].max > 0 ?
radarInfo.indicatorList[i].max :
GetMaxValue();
List<Vector3> pointList = new List<Vector3>();
List<Vector3> pointList = new List<Vector3>(dataList.Count);
dataPosList.Add(pointList);
for (int j = 0; j < dataList.Count; j++)
{