GNU bug report logs - #23848
sed not using unlocked_stdio

Previous Next

Package: sed;

Reported by: Tristan Verniquet <tverniquet <at> gmail.com>

Date: Sat, 25 Jun 2016 17:10:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Tristan Verniquet <tverniquet <at> gmail.com>
Cc: 23848 <at> debbugs.gnu.org
Subject: bug#23848: sed not using unlocked_stdio
Date: Sat, 25 Jun 2016 22:29:31 -0600
On Sat, Jun 25, 2016 at 6:10 AM, Tristan Verniquet <tverniquet <at> gmail.com> wrote:
> sed 4.2.2
>
> Most reading and writing is done in utils.c, but this does not include
> sed.h or the "unlocked-io.h" header.
>
> ltrace sed '' < <(seq 1 100)
>
> Shows lots of calls to the locked system calls.
>
> Adding include "sed.h" in utils.c and recompling and re-running ltrace
> shows the _unlocked() variants being used.
>
> This improves the performance when reading the output of seq 1 1e8 from 9.5
> seconds to 6.4 seconds. ie:
>
> time sed '' < seq.1e8 >/dev/null

Thanks for the report and the suggested fix. That sounds right, indeed.




This bug report was last modified 8 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.