JDA icon indicating copy to clipboard operation
JDA copied to clipboard

Make VoiceChannel#getMembers use Member#getVoiceState as single source of truth

Open MinnDevelopment opened this issue 4 years ago • 3 comments

Pull Request Etiquette

Changes

  • [x] Internal code
  • [ ] Library interface (affecting end-user code)
  • [ ] Documentation
  • [ ] Other: _____

Closes Issue: NaN

Description

~~By tracking the connected channel independently from the member, we can persist the information regardless of the member cache policy. VoiceChannels track the connected members internally, for optimization purposes and bypasses the cache policy in that regard. This means GuildVoiceState#getChannel is now depending on the voice state cache, rather than being atomic. We could in theory try to optimize this by using some kinda lazy caching system, but that isn't really worth it I presume.~~

This removes the complexity of having two cache points track the connections of members. The runtime gain from having such an additional tracking seems like unnecessary micro-optimization that makes the cache management unnecessarily complex.

MinnDevelopment avatar Dec 19 '20 19:12 MinnDevelopment

Bump. Why is this in the freezer? Is this effected by the weirdness introduced by Public Instances of StageChannels?

DV8FromTheWorld avatar Aug 04 '21 15:08 DV8FromTheWorld

I put this on freezer because of stage channels and need to re-evaluate the impact of lurking members. Potentially, its unaffected by that but at the time, and currently still, the stage channel voice states are not documented well.

MinnDevelopment avatar Aug 05 '21 10:08 MinnDevelopment

this might need to be reopened

V-Play-Games avatar Nov 27 '21 05:11 V-Play-Games