-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Micro-optimization #3095
Merged
Micro-optimization #3095
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8278dec
Micro-optimization
asvetlov 517ffe1
Use faster attr check instead of isinstance
asvetlov 3d72768
Add changelog
asvetlov e2e2fd2
Optimize Cython parser
asvetlov 1927fd6
Improve cythonized parser
asvetlov 530062a
Resize bytearray fast
asvetlov 8c39222
Fix tests
asvetlov a5d5ec4
Implement fast bytearray extending
asvetlov 8a28113
Move forward
asvetlov b8325eb
Drop redundant method
asvetlov 356b335
Precalculate content-encoding
asvetlov c26d616
Speedup HTTP method lookup
asvetlov e5cebbd
Reraise compiler error
asvetlov 8fb1189
Use alternative strncasecmp definition
asvetlov 904a5f0
Optimize more
asvetlov eb26e66
Move on
asvetlov 87f1dcb
Process header case insensitively
asvetlov f8fa6a6
Remove redundant type check
asvetlov bf2c422
Improve generated code formatting
asvetlov eba32bb
Improve code generator
asvetlov 781e8d4
Improve formatting
asvetlov 552c0b3
Title-case headers
asvetlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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 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
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.
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.
May be have it one-item-per-line and sorted? Would simplify management and new items addition if that happens.
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.
Sorting is boring and weak: very easy to make a mistake in sort order.
I'm thinking about ultimately applying black but not ready for it yet.
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.
black is good, but you wouldn't like what it will do with string quotes - it prefers double ultimately.
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.
Maybe we can live with it.
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.
What is black?
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.
https://github.com/ambv/black
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.
@kxepal there's a setting to disable quotes normalization. But there's other things I dislike about the style of blackened code.
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.
Yeah, that's a new feature. I agree that black isn't perfect, but eventually, there are no much good alternatives. Good news: it's quite easy to fork it and fix stuff to make you like it. In the end, we could have some aio-libs style guide which is backed by ours formatter. Still that's better than nothing.