FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-123557: Limit the reading size from Unix sockets to same limit pipes use by aplaikner · Pull Request #123558 · python/cpython · GitHub

/ cpython Public

gh-123557: Limit the reading size from Unix sockets to same limit pipes use - #123558

Closed
aplaikner wants to merge 22 commits into
python:mainfrom
aplaikner:feature-smaller-socket-buffer-pull-request
Closed

gh-123557: Limit the reading size from Unix sockets to same limit pipes use#123558
aplaikner wants to merge 22 commits into
python:mainfrom
aplaikner:feature-smaller-socket-buffer-pull-request

Conversation

aplaikner commented Sep 1, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

methane self-requested a review September 1, 2024 07:02
is_pipe = stat.S_ISFIFO(mode)
limit = self._default_pipe_size if is_pipe else remaining
is_socket = stat.S_ISSOCK(mode)
limit = self._default_pipe_size if is_pipe or is_socket else remaining

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How about use the limit for all connection, instead of socket and pipe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If there are no performance drawbacks for other types of connections, then it's a solid solution. I've only analyzed pipes and sockets.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't know connection other than pipe and socket.
But mmap+mremap+munmap overhead is very common issue for all streams.
So using chunked read by default and override it in special connection class seems better solution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How about updating Misc/NEWS.d/next/C API/2024-07-03-10-11-53.gh-issue-121313.D7gARW.rst instead of adding new changelog?
Changelog is part of Python documentation. It should be readable than commitlog for Python users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I was prompted by the blurp it bot to create a summary of the changes via the separate website.

methane commented Sep 1, 2024

Copy link
Copy Markdown
Member

See #123559. It is much simpler.

methane closed this Jan 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL