mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Remove _get_poll lookup in Message constructor
This was triggering a terrible performance regression for no good reason for all created messages that didn't have a poll, which is essentially 99.99% of messages leading to MESSAGE_CREATE dispatches having degraded performance.
This commit is contained in:
1 parent
dee5bf65c6
commit
733c583b72
3 files changed
+1
-12
No files matched your search
@@ -721,11 +721,6 @@ class _WebhookState:
|
||||
return self._parent._get_guild(guild_id)
|
||||
return None
|
||||
|
||||
def _get_poll(self, msg_id: Optional[int]) -> Optional[Poll]:
|
||||
if self._parent is not None:
|
||||
return self._parent._get_poll(msg_id)
|
||||
return None
|
||||
|
||||
def store_user(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> BaseUser:
|
||||
if self._parent is not None:
|
||||
return self._parent.store_user(data, cache=cache)
|
||||
|
||||
Reference in new issue
Block a user