Date: Tue, 27 Apr 2021 19:54:50 -0600 From: Warner Losh <imp@bsdimp.com> To: Ravi Pokala <rpokala@freebsd.org> Cc: Baptiste Daroussin <bapt@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: Re: 0cd4b781a6fa - main - pw(8): use openmemstream instead of sbuf(9) Message-ID: <CANCZdfrv4rSQbTvNwz_GuRYb31dDT8LaQvFM7_3LDX6Deomwbg@mail.gmail.com> In-Reply-To: <F8B0147D-189F-4145-BC24-FC4F39C02812@panasas.com> References: <202104270309.13R39Lur024105@gitrepo.freebsd.org> <705D11CB-3762-4437-8825-8E3040BBAB9F@panasas.com> <20210427070557.wv3lkor3tscxzdtg@aniel.nours.eu> <F8B0147D-189F-4145-BC24-FC4F39C02812@panasas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 27, 2021, 7:30 PM Ravi Pokala <rpokala@freebsd.org> wrote: > -----Original Message----- > From: Baptiste Daroussin <bapt@FreeBSD.org> > Date: 2021-04-27, Tuesday at 00:05 > To: Ravi Pokala <rpokala@freebsd.org> > Cc: <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, > <dev-commits-src-main@FreeBSD.org> > Subject: Re: 0cd4b781a6fa - main - pw(8): use openmemstream instead of > sbuf(9) > > On Mon, Apr 26, 2021 at 09:13:53PM -0700, Ravi Pokala wrote: > > -----Original Message----- > ... > > Hi Baptiste, > > > > pw(8): use openmemstream instead of sbuf(9) > > > > That's the "what", but what's the "why"? > > > > Thanks, > > > You are right about this. Here the why. I have been the one > introducing sbug in > pw(8) when I rewrote it, but since the beginning while I found this > was better > than the solution in place I didn't like adding another external lib > just for > that. > > Fair enough. > > Short after I discovered about open_memstream(3) and figured it could > fill the > same spot here but keeping the dep only on libc. > > I keep forgetting that open_memstream(3) is even a thing. `grep'ing the > src tree, it looks like it's very rarely used. > > I was puzzled about pushing > this change, and the switch to git reminded me about some uncommit > patches > sitting on my tree and I ended up pushing it. > > If people have strong opinion I can revert it back. > > I can't imagine anyone having a problem with this. :-) > Great explanation. Makes sense to me that you'd want to use a more standard way of doing this. Warner Thanks for explaining. > > -Ravi (rpokala@) > > Things that have not been taken in account in the change, but to answer > questions asked privately: > > - I have performed absolutely no performance benchmark, it does not > matter here. > > - The size of the final binary is smaller: > - 76k on amd64 for the new version > - 77k for the old version > > Best regards, > Bapt > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrv4rSQbTvNwz_GuRYb31dDT8LaQvFM7_3LDX6Deomwbg>