When calling fread and buffering turned off, a read() syscall is made for each byte. With large limits, this may take a while and is very inefficient. Fix: Change __srefill() in stdio to read blocks at a time, instead of one byte. How-To-Repeat: In python, enter the following command: t=file('bigfile', 'r', 0).read(10000000) , replacing 'bigfile' with a large file. Notice how it takes a while to run. Now, start Python with truss and enter the same, and notice the flood of read() syscalls.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
https://reviews.freebsd.org/D30548