mwittrien / BetterDiscordAddons

A series of plugins and themes for BetterDiscord.
GNU General Public License v2.0
2.05k stars 3.88k forks source link

[BUG] - StaffTag Plugin Causing Discord Client to Lag When Switching Channels #2657

Closed jetblackrx89 closed 3 months ago

jetblackrx89 commented 3 months ago

Describe the bug The StaffTag plugin is causing very bad performance issues. Changing a channel without it installed takes less than 0.5 seconds. With it enabled, it takes over 3, and elements load into view in the chat window out-of-order as they are slowly displayed.

To Reproduce Just install the plugin. See DevilBro's Haus server where people are reporting this behavior over in the #support and #plugins channels.

Expected behavior Performance of client should be the same with or without the plugin.

Screenshots N/A

Discord Build (stable, ptb or canary): 0.0.297 stable

Additional context N/A

Wryyyong commented 3 months ago

Can vouch for this, it's affecting me as well.

The console also gets spammed with the following two logs:

29062.600b1d4fbde65ff6c792.js:1 [BDFDB] (v3.5.9) ["can","ALLOW","DENY"] [props] not found in WebModules
e.<computed> @ 29062.600b1d4fbde65ff6c792.js:1
(anonymous) @ VM1179 47470.91c2d89ebc10ef7a8bdd.js:1
overrideMethod @ VM1149 react_devtools_backend.js:4012
Internal.console @ 0BDFDB.plugin.js:245
BDFDB.LogUtils.warn @ 0BDFDB.plugin.js:251
Internal.findModule @ 0BDFDB.plugin.js:1253
BDFDB.ModuleUtils.findByProperties @ 0BDFDB.plugin.js:1375
Internal.findModuleViaData @ 0BDFDB.plugin.js:2469
get @ 0BDFDB.plugin.js:2520
BDFDB.UserUtils.can @ 0BDFDB.plugin.js:3080
getUserType @ StaffTag.plugin.js:434
processMessageHeader @ StaffTag.plugin.js:281
Internal.initiatePatch @ 0BDFDB.plugin.js:2262
before @ 0BDFDB.plugin.js:8320
patches.<computed>.plugins.<computed>.<computed> @ 0BDFDB.plugin.js:2341
eval @ 0BDFDB.plugin.js:302
eval @ 0BDFDB.plugin.js:2319
(anonymous) @ renderer.js:5
Y @ 913e97994f492832597d.js:1
ob @ 94128.96e36bc877135379d96d.js:1
ih @ 94128.96e36bc877135379d96d.js:1
u @ 94128.96e36bc877135379d96d.js:1
sI @ 94128.96e36bc877135379d96d.js:1
(anonymous) @ 94128.96e36bc877135379d96d.js:1
sA @ 94128.96e36bc877135379d96d.js:1
sx @ 94128.96e36bc877135379d96d.js:1
r6 @ 94128.96e36bc877135379d96d.js:1
(anonymous) @ 94128.96e36bc877135379d96d.js:1
29062.600b1d4fbde65ff6c792.js:1 [BDFDB] (v3.5.9) Fatal Error: "before" callback of jsx in Object TypeError: Cannot read properties of null (reading 'can')
e.<computed> @ 29062.600b1d4fbde65ff6c792.js:1
(anonymous) @ VM1179 47470.91c2d89ebc10ef7a8bdd.js:1
overrideMethod @ VM1149 react_devtools_backend.js:4012
Internal.console @ 0BDFDB.plugin.js:245
BDFDB.LogUtils.error @ 0BDFDB.plugin.js:254
eval @ 0BDFDB.plugin.js:303
eval @ 0BDFDB.plugin.js:2319
(anonymous) @ renderer.js:5
Y @ 913e97994f492832597d.js:1
ob @ 94128.96e36bc877135379d96d.js:1
ih @ 94128.96e36bc877135379d96d.js:1
u @ 94128.96e36bc877135379d96d.js:1
sI @ 94128.96e36bc877135379d96d.js:1
(anonymous) @ 94128.96e36bc877135379d96d.js:1
sA @ 94128.96e36bc877135379d96d.js:1
sx @ 94128.96e36bc877135379d96d.js:1
r6 @ 94128.96e36bc877135379d96d.js:1
(anonymous) @ 94128.96e36bc877135379d96d.js:1
Andy76swe commented 3 months ago

I'm trying it right now and its still the same version, same sluggish behaviour

mwittrien commented 3 months ago

Delete 0BDFDB.DATA.JSON in your plugins folder and reload discord