Bug#799553: annotate-output: Optimze case of constant format

Stefan Fritsch sf at sfritsch.de
Sun Sep 20 09:03:20 UTC 2015


Package: devscripts
Version: 2.15.8
Severity: wishlist
Tags: patch

Hi,

I sometimes use annotate-output with a constant prefix (not containing a
time format string) to mark the output of several programs that run at
the same time. In this case, it is not necessary to call 'date' for each
line. The attached patch adds an optimization for this case.

On my machine, for a 10000 line FILE, a call to

annotate-output +PREFIX cat FILE

takes > 10s without my patch and < 0.3s with my patch. The output is the
same in both cases.

Cheers,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotate-output.diff
Type: text/x-diff
Size: 708 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20150920/15981d63/attachment.diff>


More information about the devscripts-devel mailing list