Skip to content

Refactor code a bit to reduce allocations and dynamic dispatches #10

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

Merged
merged 3 commits into from
Jan 7, 2023

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Jan 7, 2023

Together with JuliaWeb/HTTP.jl#985, this reduces allocations on a typical request by about ~100. The main wins here are hard-coding TCPSocket as the io field of SSLStream (which we assume anyway), and changing the geterror function to a macro to avoid the closure boxing problem.

quinnj added 3 commits January 6, 2023 23:51
Together with JuliaWeb/HTTP.jl#985, this reduces
allocations on a typical request by about ~100. The main wins here are
hard-coding TCPSocket as the `io` field of `SSLStream` (which we assume
anyway), and changing the `geterror` function to a macro to avoid the
closure boxing problem.
@codecov-commenter
Copy link

Codecov Report

Merging #10 (d0f750b) into main (6789aa0) will increase coverage by 0.47%.
The diff coverage is 60.86%.

@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   75.33%   75.80%   +0.47%     
==========================================
  Files           2        2              
  Lines        1046     1050       +4     
==========================================
+ Hits          788      796       +8     
+ Misses        258      254       -4     
Impacted Files Coverage Δ
src/ssl.jl 76.44% <60.86%> (+1.21%) ⬆️
src/OpenSSL.jl 75.63% <0.00%> (+0.27%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@quinnj quinnj merged commit f733e49 into main Jan 7, 2023
@quinnj quinnj deleted the jq-remove-allocations branch January 7, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants