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
feat: optimize construction of outgoing packets #1118
Conversation
Codecov ReportBase: 99.72% // Head: 99.72% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1118 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 22 22
Lines 2561 2567 +6
Branches 452 454 +2
=======================================
+ Hits 2554 2560 +6
Misses 5 5
Partials 2 2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
So the first is parsing the incoming message, its much smaller. Not much more we can do there The rest is handling the question or responses. Handle response is mostly cache lookups |
Might make sense to do a pxd for the cache so we could make dns_entry_matches a cdef since it's called all over the place |
Might not be worth the effort though as we already met the goal of cutting the base load cpu usage by 50% with this PR getting us over the mark |
While the tests cover this 100%, I left it running overnight on 2 production systems to be sure there weren't any unexpected side effects and everything looks good this morning. |
This is ~27% speed up. We can get some more by optimizing the packing but the bulk of the run time is incoming so its likely not worth the maintenance burden to keep the pxd file in sync unless someone has a use case were they construct many outgoing packets.