diff --git a/Logic/UIEventSource.ts b/Logic/UIEventSource.ts index ad316af2ef..c631f57460 100644 --- a/Logic/UIEventSource.ts +++ b/Logic/UIEventSource.ts @@ -250,32 +250,12 @@ export class ImmutableStore extends Store { export class UIEventSource extends Store { - private static allSources: UIEventSource[] = UIEventSource.PrepPerf(); public data: T; private _callbacks: ((t: T) => (boolean | void | any)) [] = []; constructor(data: T, tag: string = "") { super(tag); this.data = data; - UIEventSource.allSources.push(this); - } - - static PrepPerf(): UIEventSource[] { - if (Utils.runningFromConsole) { - return []; - } - // @ts-ignore - window.mapcomplete_performance = () => { - console.log(UIEventSource.allSources.length, "uieventsources created"); - const copy = [...UIEventSource.allSources]; - copy.sort((a, b) => b._callbacks.length - a._callbacks.length); - console.log("Topten is:") - for (let i = 0; i < 10; i++) { - console.log(copy[i].tag, copy[i]); - } - return UIEventSource.allSources; - } - return []; } public static flatten(source: Store>, possibleSources?: Store[]): UIEventSource { @@ -507,4 +487,4 @@ export class UIEventSource extends Store { }) } -} \ No newline at end of file +}