gh-103285: Rewrite _splitlines_no_ff to improve performance#103307
Merged
hauntsaninja merged 5 commits intopython:mainfrom Apr 24, 2023
Merged
gh-103285: Rewrite _splitlines_no_ff to improve performance#103307hauntsaninja merged 5 commits intopython:mainfrom
hauntsaninja merged 5 commits intopython:mainfrom
Conversation
sobolevn
reviewed
Apr 6, 2023
Misc/NEWS.d/next/Library/2023-04-06-04-35-59.gh-issue-103285.rCZ9-G.rst
Outdated
Show resolved
Hide resolved
Member
Author
|
@isidentical hi could you take a look at the change when you have some time? Thanks! |
Member
|
This was something I complained a lot in the past, thanks for taking a stab at it. |
Member
Author
|
No problem :) Let me know if you need me to change anything. |
isidentical
reviewed
Apr 18, 2023
…CZ9-G.rst Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Docstring * Check explicitly for maxline * \n\r preserve
6e7e73a to
14a73a5
Compare
AA-Turner
reviewed
Apr 23, 2023
isidentical
approved these changes
Apr 23, 2023
Member
isidentical
left a comment
There was a problem hiding this comment.
Looks great, tested a bunch of scenarios involving consecutive \rs etc. and seems to imitate the behavior of the old implementation exactly. With the additional tests, this should be good to go!
AA-Turner
approved these changes
Apr 23, 2023
Member
Author
|
Do we need the approval from @sobolevn for auto merge to take effect? |
Member
Author
|
Oh, it seems like |
hauntsaninja
approved these changes
Apr 24, 2023
Contributor
hauntsaninja
left a comment
There was a problem hiding this comment.
Thank you, this looks great!
This file contains hidden or 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
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.
See comment and benchmark in #103285
ast.get_source_segmentis slower than it needs to be because it reads every line of the source. #103285