Skip to content
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

poll_transmit is large #2121

Open
gretchenfrage opened this issue Dec 26, 2024 · 2 comments
Open

poll_transmit is large #2121

gretchenfrage opened this issue Dec 26, 2024 · 2 comments

Comments

@gretchenfrage
Copy link
Collaborator

Connection.poll_transmit is 582 lines. I think it should be split up somehow.

Maybe a good place to start would be to factor out the body of the loop over spaces? It accounts for 380 lines, and factoring it out would reduce rightward drift.

@djc
Copy link
Member

djc commented Dec 27, 2024

This drifted by on HN recently, and I've definitely noticed this:

https://www.16elt.com/2024/09/25/first-book-of-byte-sized-tech/#Idea-2-Smaller-components-are-not-necessarily-better-for-modularity

I've long had a guideline that single-call functions are little suspect, so not sure this is the right direction (but, I haven't looked at your draft PR yet).

@gretchenfrage
Copy link
Collaborator Author

The "DatagramBuilder" idea Ralith noted in #2122 seems worth exploring

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

No branches or pull requests

2 participants