Skip to content

Commit a6cbe9e

Browse files
committed
Improvements to UI performance
1 parent 8b7beca commit a6cbe9e

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Assets/_Project/Scenes/tally-viz.unity

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/_Project/Scripts/Core/DebugManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void ClearDisplay ()
6363
}
6464
void UpdateScroll ()
6565
{
66-
Canvas.ForceUpdateCanvases ();
66+
// make the canvases update their positions - causes big performance spikes and is not needed for debugging
67+
//Canvas.ForceUpdateCanvases ();
6768
debugScrollRect.verticalNormalizedPosition = 0f;
6869
}
6970

Assets/_Project/Scripts/Data/Timeline.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ public void SetTimelineStatus (TimelineStatus _status, bool fromUI = false)
180180

181181
// if the call (note, original status) came from within the game then show in UI
182182
if (!fromUI) timelineStatusText.text = _status.ToString ();
183-
184-
// run immediately
185-
//TimelineControl ();
186183
}
187184

188185

@@ -525,8 +522,8 @@ IEnumerator HistoryLoop ()
525522

526523

527524
} else {
528-
// safety
529-
timeDiffScaled = 1;
525+
// for safety and a pause between data sets
526+
timeDiffScaled = 5;
530527
}
531528

532529
// time difference to next event (or safety)
@@ -592,7 +589,8 @@ void UpdateCounts ()
592589

593590
public void UpdateScroll ()
594591
{
595-
Canvas.ForceUpdateCanvases ();
592+
// make the canvases update their positions - causes big performance spikes and is not needed for debugging
593+
//Canvas.ForceUpdateCanvases ();
596594
bufferScrollRect.verticalNormalizedPosition = 0f;
597595
historyScrollRect.verticalNormalizedPosition = 0f;
598596
}

0 commit comments

Comments
 (0)