From 63992659fc9ef986003db1a6cae32c5d9972e376 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 27 Oct 2023 10:28:20 +0300 Subject: [PATCH] more benchmarking --- files/assets/js/emoji_modal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/assets/js/emoji_modal.js b/files/assets/js/emoji_modal.js index 62a7f6a4e..7ae12c425 100644 --- a/files/assets/js/emoji_modal.js +++ b/files/assets/js/emoji_modal.js @@ -154,13 +154,13 @@ const emojisSearchDictionary = { // get public emojis list function fetchEmojis() { - const t = Date.now() / 1000 const headers = new Headers({xhr: "xhr"}) return fetch("/emojis.json", { headers, }) .then(res => res.json()) .then(emojis => { + const t = Date.now() / 1000 if (! (emojis instanceof Array )) throw new TypeError("[EMOJI DIALOG] rDrama's server should have sent a JSON-coded Array!"); @@ -170,6 +170,8 @@ function fetchEmojis() { const bussyDOM = document.createElement("div"); + console.log(Date.now() / 1000 - t) + for(let i = 0; i < emojis.length; i++) { const emoji = emojis[i];