Added perf TODO

This commit is contained in:
RogueException
2016-06-11 18:08:20 -03:00
parent c1710338ba
commit 4b64807465

View File

@@ -29,6 +29,7 @@ namespace Discord
=> Task.FromResult<IReadOnlyCollection<IGuildUser>>(Members.Skip(offset).Take(limit).ToImmutableArray());
public CachedGuildUser GetUser(ulong id)
{
//TODO: It's slow to do a perms check here... Maybe only do it on external calls?
var user = Guild.GetUser(id);
if (user != null && Permissions.GetValue(Permissions.ResolveChannel(user, this, user.GuildPermissions.RawValue), ChannelPermission.ReadMessages))
return user;