From ae87f2abe0256e43a5a43b50d8084c1f74a11ec5 Mon Sep 17 00:00:00 2001 From: easrng Date: Fri, 18 Feb 2022 14:21:54 -0500 Subject: [PATCH] actually fix perf --- frontend/lib/chat.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/lib/chat.mjs b/frontend/lib/chat.mjs index 46f802c..e02ff55 100644 --- a/frontend/lib/chat.mjs +++ b/frontend/lib/chat.mjs @@ -57,10 +57,10 @@ const setupChatboxEvents = (socket) => { }; let results = await findEmojis(search); let yieldAt = performance.now() + 13; - for (let i = 0; i < results.length; i += 10) { + for (let i = 0; i < results.length; i += 100) { emojiAutocomplete.append.apply( emojiAutocomplete, - results.slice(i, i + 1000).map(([name, replaceWith, ext], i) => { + results.slice(i, i + 100).map(([name, replaceWith, ext], i) => { const button = Object.assign(document.createElement("button"), { className: "emoji-option", onmousedown: (e) => e.preventDefault(),