Download raw body.
BUFSIZ-related pessimization in fvwrite.c
On Fri, Apr 26, 2024 at 4:05 PM Todd C. Miller <Todd.Miller@sudo.ws> wrote: > > On Fri, 26 Apr 2024 13:56:59 -0700, enh wrote: > > > [-netbsd since they took the Apple patch as-is] > > > > openbsd: thoughts? > > I see no reason not to do this, short writes are handled gracefully. > I'm not aware of any hard requirement to do buffered writes in > multiples of the buffer size. This may just be stdio trying to do > writes in a multiple of the optimal I/O block size (st_blksize). want me to try the "who needs integer multiples anyway?" version on Android first and let you know how it goes, or do you think you're going to stick with the integer multiples restriction? (left to my own devices i'd just write all the data i have, but i don't think i improve the lives of my developers by being different. since the previous mail where i mentioned that musl just writev()s the buffer and the new data together, i did test glibc too, and for a 64MiB+5bytes write, it just does a 64MiB write and saves the 5 bytes for later. if you do a small write, a huge write, and a small write, it copies enough of the huge write to fill the buffer, writes that, a round number of buffers worth of the huge write, and then the rest.) > - todd
BUFSIZ-related pessimization in fvwrite.c