Browse Source

Delete old lag reduction hack

Equbuxu 2 years ago
parent
commit
56d3cc0fcd
1 changed files with 0 additions and 11 deletions
  1. 0 11
      src/PixiEditor/Models/DocumentModels/ActionAccumulator.cs

+ 0 - 11
src/PixiEditor/Models/DocumentModels/ActionAccumulator.cs

@@ -15,10 +15,6 @@ namespace PixiEditor.Models.DocumentModels;
 #nullable enable
 internal class ActionAccumulator
 {
-    private const long minMsPerUpdate = 1000 / 60;
-    private Stopwatch updateStopwatch = Stopwatch.StartNew();
-    private long lastUpdateMs = 0;
-
     private bool executing = false;
 
     private List<IAction> queuedActions = new();
@@ -65,13 +61,6 @@ internal class ActionAccumulator
 
         while (queuedActions.Count > 0)
         {
-            // wait to limit update rate
-            long currentMillis = updateStopwatch.ElapsedMilliseconds;
-            long waitDuration = minMsPerUpdate - (currentMillis - lastUpdateMs);
-            if (waitDuration > 0)
-                await Task.Delay((int)waitDuration);
-            lastUpdateMs = updateStopwatch.ElapsedMilliseconds;
-
             // select actions to be processed
             var toExecute = queuedActions;
             queuedActions = new List<IAction>();