-
Notifications
You must be signed in to change notification settings - Fork 326
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
idna: prevent allocations (mainly) in Punycode decoding #635
Conversation
Codecov Report
@@ Coverage Diff @@
## master #635 +/- ##
==========================================
+ Coverage 81.09% 81.31% +0.21%
==========================================
Files 22 22
Lines 3512 3537 +25
==========================================
+ Hits 2848 2876 +28
+ Misses 664 661 -3
Continue to review full report at Codecov.
|
@valenting can you review the API introduced in 5c91e06? (Feel free to look at the other stuff too, but it's a bit gnarly and only amounts to a modest performance improvement for more complex invocations of |
I think it's generally OK. As a side note, do we use Idna.normalized for anything? Or can it be just a local buffer? |
What do you mean by "local buffer"? |
In the sense that it doesn't seem to be used outside of |
No, that is correct. I just though amortizing the cost of allocating that buffer would be better for performance than allocating it locally for every call to |
☔ The latest upstream changes (presumably 3cc7e69) made this pull request unmergeable. Please resolve the merge conflicts. |
Newer version in #645. |
No description provided.