New submission from STINNER Victor: Since issue #12268 has been fixed, it looks like it became easier to modify the io to use the writev() function when available.
For example, if FileIO.writelines() uses writev(), it can be used by TextIOWrapper.write() through BufferedWriter. The _io.TextIOWrapper.write() method stores encoded chunks of text into a list. It can calls buffer.writlines(pending) instead of buffer.write(b''.join(pending)). I expect less Python function calls and less system calls, and so better performances because both are expensive (especially I/O syscalls). See also issue #15723. I don't know if/how readv() can be used to optimize I/O performances. ---------- components: IO messages: 186259 nosy: gregory.p.smith, haypo, pitrou priority: normal severity: normal status: open title: Use writev() function in the io module type: performance versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17655> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com