-
Notifications
You must be signed in to change notification settings - Fork 6k
Milestone
Description
We have many classes in the library. Bots use a lot of memory.
Let's add __slots__ to the classes where they make sense.
More info on what __slots__ are: https://stackoverflow.com/questions/472000/usage-of-slots?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
We have to consider where it actually makes sense:
- Let's find out candidates where users are likely to monkey patch their own attributes on library objects. These should not receive slots as it would break existing code bases.
- Which objects are so big that we would like to benefit from
__slot__'s performance boosts nonetheless?
Please list candidates in the comments.
RememberTheAir