From e77dcf7f859aaef114cee6acf41a7974f19c09ca Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Mon, 26 Apr 2021 13:11:30 -0500 Subject: [PATCH] Don't create an unnecessary array in conversation batcher --- ts/background.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index c0520d1e4..3bb448952 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -879,10 +879,10 @@ export async function startApp(): Promise { const changedConvoBatcher = createBatcher({ name: 'changedConvoBatcher', processBatch(batch) { - const deduped = Array.from(new Set(batch)); + const deduped = new Set(batch); window.log.info( 'changedConvoBatcher: deduped ' + - `${batch.length} into ${deduped.length}` + `${batch.length} into ${deduped.size}` ); deduped.forEach(conversation => {