Skip to content

Socket Callback Optimizations #172

Merged
saghul merged 7 commits intoaio-libs:masterfrom
Vizonex:socket-callback-optimizations
Jul 7, 2025
Merged

Socket Callback Optimizations #172
saghul merged 7 commits intoaio-libs:masterfrom
Vizonex:socket-callback-optimizations

Conversation

@Vizonex
Copy link
Member

@Vizonex Vizonex commented Jun 21, 2025

What do these changes do?

These changes are meant to speedup socket callbacks for the read and write file descriptors making the dns resolver run a bit smoother.

Are there changes in behavior for the user?

Removed some internal flags related to read and write but I don't think anybody is ever going to use them to begin with.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@codecov
Copy link

codecov bot commented Jun 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.79%. Comparing base (83533f4) to head (cde9e16).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   96.76%   97.79%   +1.02%     
==========================================
  Files           3        3              
  Lines         557      545      -12     
  Branches       36       33       -3     
==========================================
- Hits          539      533       -6     
+ Misses         10        6       -4     
+ Partials        8        6       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Vizonex
Copy link
Member Author

Vizonex commented Jun 23, 2025

@webknjaz @Dreamsorcerer I just reverted those ignore blocks.

@saghul
Copy link
Contributor

saghul commented Jun 23, 2025

If socket is both readable and writable you are now making 2 calls to process fds vs one before. How does that optimize performance? Do you have numbers?

Nvm, I forgot the loop will give us independent callbacks anyway. 👍

@saghul saghul merged commit ad96d79 into aio-libs:master Jul 7, 2025
19 checks passed
@Vizonex Vizonex deleted the socket-callback-optimizations branch July 8, 2025 19:36
@bdraco bdraco mentioned this pull request Dec 5, 2025
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.

4 participants