From ebdba32393d7b1b3f7f73aab793e39dc2fedb87d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 8 Dec 2018 12:06:37 -0700 Subject: [PATCH] Add a comment about the SettingsStore being slow --- src/shouldHideEvent.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shouldHideEvent.js b/src/shouldHideEvent.js index 609f48b128..adc89a126a 100644 --- a/src/shouldHideEvent.js +++ b/src/shouldHideEvent.js @@ -38,7 +38,9 @@ function memberEventDiff(ev) { } export default function shouldHideEvent(ev) { - // Wrap getValue() for readability + // Wrap getValue() for readability. Calling the SettingsStore can be + // fairly resource heavy, so the checks below should avoid hitting it + // where possible. const isEnabled = (name) => SettingsStore.getValue(name, ev.getRoomId()); // Hide redacted events