From: Jeff Hostetler <git@jeffhostetler.com>
To: "René Scharfe" <l.s.r@web.de>, "Git Mailing List" <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH] trace2: add dots directly to strbuf in perf_fmt_prepare()
Date: Tue, 5 Nov 2019 10:00:09 -0500 [thread overview]
Message-ID: <0fae18b6-dd98-f7df-d2a9-cfdc34916686@jeffhostetler.com> (raw)
In-Reply-To: <c4237b45-6faf-c1fc-eb13-b6c71b7fb6ef@web.de>
On 11/4/2019 2:27 PM, René Scharfe wrote:
> The initialization function of the Trace2 performance format target sets
> aside a stash of dots for indenting output. Get rid of it and use
> strbuf_addchars() to provide dots on demand instead. This shortens the
> code, gets rid of a small heap allocation and is a bit more efficient.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>
Looks good!
Thanks for simplifying my otherwise convoluted code.
Jeff
prev parent reply other threads:[~2019-11-05 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 19:27 [PATCH] trace2: add dots directly to strbuf in perf_fmt_prepare() René Scharfe
2019-11-04 19:55 ` Jeff King
2019-11-05 15:00 ` Jeff Hostetler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0fae18b6-dd98-f7df-d2a9-cfdc34916686@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).