Message292749
Given the following snippet:
with open("x", "w+", encoding="utf-8") as fp:
pass
Creating the TextIOWrapper object requires many syscall: see the issue #30228.
But I also noticed that *closing* such object also requires multiple lseek() syscalls, whereas the snippet doesn't read nor write anything.
Attached PR avoids lseek() if read and write buffers are empty. |
|
Date |
User |
Action |
Args |
2017-05-02 12:17:53 | vstinner | set | recipients:
+ vstinner, pitrou, serhiy.storchaka |
2017-05-02 12:17:53 | vstinner | set | messageid: <1493727473.11.0.059505577548.issue30229@psf.upfronthosting.co.za> |
2017-05-02 12:17:53 | vstinner | link | issue30229 messages |
2017-05-02 12:17:53 | vstinner | create | |
|