-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fix option parsing #1229
Fix option parsing #1229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be clearer in using variable names, and this method still keeps the line length under 120.
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
Co-authored-by: krittick <ben@krittick.net>
RationaleThe API sends resolved users (and other data types such as channels and roles) in the interaction data. This PR fixes option parsing to use that resolved data instead of using BenchmarksAll times are relative times (i.e. they can be negative) but they are accurate when compared against each other. One userIn this benchmark we can see that the previous implementation slightly outperforms for the bots own user as it is always cached. The new implementation performs ~100-150ms faster for other users. Five usersIn this benchmark the bot user performs very similarly, but other users pull ahead by up to one second (1000ms). |
Summary
Fixes option parsing... why was it like this in the first place
Checklist
type: ignore
comments were used, a comment is also left explaining why