UI: Fix (most) perf issues in Active Scripts (#498)

This commit is contained in:
David Walker
2023-04-30 16:31:29 -07:00
committed by GitHub
parent 2f46831ad1
commit 8b7166e4ed
6 changed files with 11 additions and 38 deletions
@@ -1,4 +0,0 @@
import { EventEmitter } from "../utils/EventEmitter";
/** Event emitter that triggers when scripts are started/stopped */
export const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();
-2
View File
@@ -5,7 +5,6 @@
import { ScriptDeath } from "./ScriptDeath";
import { WorkerScript } from "./WorkerScript";
import { workerScripts } from "./WorkerScripts";
import { WorkerScriptStartStopEventEmitter } from "./WorkerScriptStartStopEventEmitter";
import { GetServer } from "../Server/AllServers";
import { AddRecentScript } from "./RecentScripts";
@@ -91,5 +90,4 @@ function removeWorkerScript(workerScript: WorkerScript): void {
workerScripts.delete(workerScript.pid);
AddRecentScript(workerScript);
WorkerScriptStartStopEventEmitter.emit();
}