-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This also removes `from . import message as messages` import in `parser.py`.
TODO: Turns out standard enums are evil. I'm going to copy Hikari's Enum to make it faster. |
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO:
Fixfixed_parents_of
not including BaseEvent (replace -2 with -1 in slice expr)Fix ServerMemberRemoveEvent erroring on removing from cache if member is not cachedfixed