PERF: Avoid excessive object creations in watched words (#27354)

Inline the helper functions, avoid creating and then immediately destructuring arrays, use complete strings instead of string interpolation, Map instead of a pojo.
This commit is contained in:
Jarek Radosz
2024-06-10 14:44:31 +02:00
committed by GitHub
parent 71391cd40d
commit 42a529f9ae
6 changed files with 51 additions and 67 deletions

View File

@ -91,7 +91,6 @@ module PrettyText
discourse-common/addon/lib/deprecated
discourse-common/addon/lib/escape
discourse-common/addon/lib/avatar-utils
discourse-common/addon/utils/watched-words
discourse/app/lib/to-markdown
discourse/app/static/markdown-it/features
].each do |f|