Re: ts(1): parse input format string only once

2022-08-10 Thread Scott Cheloha
On Fri, Jul 29, 2022 at 08:13:14AM -0500, Scott Cheloha wrote: > On Wed, Jul 13, 2022 at 12:50:24AM -0500, Scott Cheloha wrote: > > We reduce overhead if we only parse the user's format string once. To > > achieve that, this patch does the following: > > > > [...] > > > > - When parsing the user

Re: ts(1): parse input format string only once

2022-07-29 Thread Scott Cheloha
On Wed, Jul 13, 2022 at 12:50:24AM -0500, Scott Cheloha wrote: > We reduce overhead if we only parse the user's format string once. To > achieve that, this patch does the following: > > [...] > > - When parsing the user format string in fmtfmt(), keep a list of > where each microsecond substri

ts(1): parse input format string only once

2022-07-12 Thread Scott Cheloha
We reduce overhead if we only parse the user's format string once. To achieve that, this patch does the following: - Move "format" into main(). We don't need it as a global anymore. - Move buffer allocation into fmtfmt(). As claudio@ mentioned in a different thread, we need at most (3 * strl