mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +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:
@ -1849,7 +1849,7 @@ class Message(PartialMessage, Hashable):
|
||||
try:
|
||||
self.poll = Poll._from_data(data=data['poll'], message=self, state=state)
|
||||
except KeyError:
|
||||
self.poll = state._get_poll(self.id)
|
||||
pass
|
||||
|
||||
try:
|
||||
# if the channel doesn't have a guild attribute, we handle that
|
||||
|
Reference in New Issue
Block a user