Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General cleanup of the library #3

Merged
merged 123 commits into from
Aug 2, 2024
Merged

General cleanup of the library #3

merged 123 commits into from
Aug 2, 2024

Conversation

MCausc78
Copy link
Owner

@MCausc78 MCausc78 commented Jul 6, 2024

TODO:

  • Fix _parents_of not including BaseEvent (replace -2 with -1 in slice expr) fixed
  • Fix ServerMemberRemoveEvent erroring on removing from cache if member is not cached fixed
  • Introduce "pms_by_user" cache

@MCausc78
Copy link
Owner Author

TODO: Turns out standard enums are evil. I'm going to copy Hikari's Enum to make it faster.

MCausc78 added 28 commits July 28, 2024 02:58
This speeds up library a **lot**:
```
Benchmarking DMChannel parsing.
[DMChannel] Time using pyvolt ----: 0.107055 seconds
[DMChannel] Time using revolt.py -: 0.150814 seconds
[DMChannel] Time using voltage ---: 2.892504 seconds
Benchmarking GroupChannel parsing.
[GroupChannel] Time using pyvolt ----: 0.185667 seconds
[GroupChannel] Time using revolt.py -: 0.261947 seconds
[GroupChannel] Time using voltage ---: 7.473850 seconds
Benchmarking TextChannel parsing.
[TextChannel] Time using pyvolt ----: 0.592224 seconds
[TextChannel] Time using revolt.py -: 8.655765 seconds
[TextChannel] Time using voltage ---: 15.454577 seconds
Benchmarking Member parsing.
[Member] Time using pyvolt ----: 0.056654 seconds
[Member] Time using revolt.py -: 0.402864 seconds
[Member] Time using voltage ---: 0.529478 seconds
Benchmarking Message parsing.
[Message] Time using pyvolt ----: 0.056601 seconds
[Message] Time using revolt.py -: 0.261532 seconds
[Message] Time using voltage ---: 0.516635 seconds
Benchmarking Server parsing.
[Server] Time using pyvolt ----: 0.684154 seconds
[Server] Time using revolt.py -: 4.294232 seconds
[Server] Time using voltage ---: 11.650132 seconds
Benchmarking User parsing.
[User] Time using pyvolt ----: 0.679173 seconds
[User] Time using revolt.py -: 1.043663 seconds
[User] Time using voltage ---: 3.473125 seconds
```
Library just takes 2.361524 seconds to parse DMs, groups, text channels, members, messages, servers and users!
@MCausc78 MCausc78 merged commit 4c140b5 into master Aug 2, 2024
@MCausc78 MCausc78 deleted the ready branch August 2, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant