What happens when the bug or crash occurs?
Enabling the MemberCount plugin causes Discord's renderer to consume substantially more CPU while completely idle.
In the same server and channel, with no user interaction:
- MemberCount enabled: approximately 3–8% sustained CPU usage, with frequent much larger spikes
- MemberCount disabled: approximately 0.25–1.5% CPU usage
The DevTools Performance Monitor also shows continuous JS heap growth while MemberCount is enabled. The heap repeatedly grows from roughly 300–500 MB toward 800 MB–1 GB before garbage collection reduces it again. With MemberCount disabled, the heap remains around 200–250 MB and is considerably more stable.
This appears to be continuous allocation churn rather than necessarily a retained memory leak: garbage collection reclaims much of the memory, but the repeated allocation and collection causes significant idle CPU usage.
I isolated MemberCount by testing my enabled plugins in groups of six, then testing the remaining plugins individually. MemberCount alone consistently reproduces the issue.
The problem occurs while idling inside a server. No scrolling, typing, voice activity, or other interaction is required.
I have attached two DevTools Performance Monitor screenshots:
- MemberCount enabled
- MemberCount disabled
Both were recorded under the same general idle conditions.
What is the expected behaviour?
MemberCount should not cause continuous background CPU usage or sustained heap allocation while Discord is idle.
The plugin should only subscribe to and recompute the data required for the currently visible feature.
In particular:
- Server tooltip counts should only be queried while the user is hovering over a server icon and the tooltip is mounted.
- Member-list counts should only update when relevant guild, channel, member-list, or voice-state data actually changes.
- Flux selectors should ideally return stable primitive values such as the final count, rather than newly allocated objects or arrays that can trigger unnecessary rerenders.
Idle CPU and heap behaviour should remain close to the baseline observed with MemberCount disabled.
How do you recreate this bug or crash?
- Install Vencord.
- Use Discord Stable.
- Enable the MemberCount plugin.
- Enable the Member List option. I also had Tool Tip and Voice Activity enabled during testing.
- Restart Discord.
- Open any server and remain idle in a text channel.
- Open DevTools with Ctrl+Shift+I.
- Open More tools → Performance monitor.
- Enable CPU usage and JS heap size.
- Observe CPU usage and heap behaviour for approximately 1–2 minutes.
- Disable MemberCount and restart Discord.
- Repeat the same test in the same server and channel.
Observed result:
- With MemberCount enabled, idle CPU remains around 3–8% and the JS heap continuously grows until garbage collection occurs.
- With MemberCount disabled, idle CPU falls to approximately 0.25–1.5% and heap usage remains much lower and more stable.
Errors
No relevant console errors are produced.
This is a performance issue rather than a crash.
Request Agreement
What happens when the bug or crash occurs?
Enabling the MemberCount plugin causes Discord's renderer to consume substantially more CPU while completely idle.
In the same server and channel, with no user interaction:
The DevTools Performance Monitor also shows continuous JS heap growth while MemberCount is enabled. The heap repeatedly grows from roughly 300–500 MB toward 800 MB–1 GB before garbage collection reduces it again. With MemberCount disabled, the heap remains around 200–250 MB and is considerably more stable.
This appears to be continuous allocation churn rather than necessarily a retained memory leak: garbage collection reclaims much of the memory, but the repeated allocation and collection causes significant idle CPU usage.
I isolated MemberCount by testing my enabled plugins in groups of six, then testing the remaining plugins individually. MemberCount alone consistently reproduces the issue.
The problem occurs while idling inside a server. No scrolling, typing, voice activity, or other interaction is required.
I have attached two DevTools Performance Monitor screenshots:
Both were recorded under the same general idle conditions.
What is the expected behaviour?
MemberCount should not cause continuous background CPU usage or sustained heap allocation while Discord is idle.
The plugin should only subscribe to and recompute the data required for the currently visible feature.
In particular:
Idle CPU and heap behaviour should remain close to the baseline observed with MemberCount disabled.
How do you recreate this bug or crash?
Observed result:
Errors
No relevant console errors are produced.
This is a performance issue rather than a crash.
Request Agreement