Add a comment about the SettingsStore being slow

pull/21833/head
Travis Ralston 2018-12-08 12:06:37 -07:00 committed by GitHub
parent f2468f562d
commit ebdba32393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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