Gentoo Archives: gentoo-dev

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place
Date: Thu, 19 May 2016 02:02:39
Message-Id: 573D1EB0.2000508@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place by Jeroen Roovers
1 Jeroen Roovers:
2 > On Wed, 18 May 2016 19:31:38 -0400
3 > Göktürk Yüksek <gokturk@g.o> wrote:
4 >
5 >> There could be some performance implications. cat will usually do
6 >> slow, buffered I/O. cp tries to be smarter with allocation, i.e. it
7 >> may take advantage of the btrfs specific clone to do a O(1) copy.
8 >
9 > Really? We're talking about editing streams of usually a couple of
10 > kilobytes and performance is what you're worried about? Because of
11 > not using one particular filesystem maybe? Really?
12 >
13 >
14 I wasn't against the use of redirection, just wondering if there was a
15 reason to prefer that over cp. To me, an extra dup2() in redirection
16 seems useless. You can also argue that an extra syscall() has no visible
17 impact and I wouldn't object. cp should work as efficient as shell
18 redirection and potentially better in some cases. Sure, it won't make a
19 noticeable difference with such small files.
20
21 > jer
22 >