From c75e2acfb491d3fe53fc7e667edd034d05267363 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Wed, 23 Jan 2019 12:01:23 -0500
Subject: [PATCH] Remove the redux throttle for targets update.

This fixes the root cause of #2858, which is caused because we are rendering the sound editor based on the GUI editing target data, but retrieving the sound based on the vms editing target data. The throttle of the redux action was causing those to get out of sync while a project was running.

The throttle is not needed because the vm runtime already batches those updates at 30 fps. The updates that come from top-level actions like switching sprites go out immediately.

This is also a minor performance boost, because there was a few ms being spent in setting and checking timers that were not needed.
---
 src/reducers/targets.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/reducers/targets.js b/src/reducers/targets.js
index 17a73f7d8..7da81982a 100644
--- a/src/reducers/targets.js
+++ b/src/reducers/targets.js
@@ -39,10 +39,7 @@ const updateTargets = function (targetList, editingTarget) {
     return {
         type: UPDATE_TARGET_LIST,
         targets: targetList,
-        editingTarget: editingTarget,
-        meta: {
-            throttle: 30
-        }
+        editingTarget: editingTarget
     };
 };
 const highlightTarget = function (targetId) {
-- 
GitLab