From af35e8678f1778d4e5d5cbb32a9fc53482727ec5 Mon Sep 17 00:00:00 2001 From: mischa Date: Mon, 18 Mar 2024 15:49:02 +0800 Subject: [PATCH] Prediction: explain insertions complexity --- Assets/Mirror/Core/Prediction/Prediction.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Mirror/Core/Prediction/Prediction.cs b/Assets/Mirror/Core/Prediction/Prediction.cs index 33324748c..7c9fcf541 100644 --- a/Assets/Mirror/Core/Prediction/Prediction.cs +++ b/Assets/Mirror/Core/Prediction/Prediction.cs @@ -115,6 +115,7 @@ public static T CorrectHistory( history.RemoveAt(0); // insert the corrected state into the history, or overwrite if already exists + // SortedList insertions are O(N)! history[corrected.timestamp] = corrected; // the entry behind the inserted one still has the delta from (before, after).