Re: [RFC] use buffered stdio (lightly tested)

2019-01-05 Thread Eric Wong
In the future, I think it could be even more beneficial to buffer to zlib (if the client accepts gzip) and bypass stdio buffering in those cases. Smaller responses via gzip means less IPC overhead and wakeups for the reader. cgit is linked against zlib anyways because of git, so no extra

Re: [RFC] use buffered stdio (lightly tested)

2019-01-02 Thread Eric Wong
> index 70f5b74..2c387c1 100644 > --- a/filter.c > +++ b/filter.c > @@ -143,22 +145,22 @@ void cgit_init_filters(void) > #endif > > #ifndef NO_LUA > -static ssize_t (*libc_write)(int fd, const void *buf, size_t count); > +static ssize_t (*libc_fwrite)(const void *buf, size_t size, size_t n,