From: Robert Coup <robert@coup.net.nz>
To: Jeff King <peff@peff.net>
Cc: Robert Coup via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] upload-pack: add tracing for fetches
Date: Wed, 11 Oct 2023 23:36:07 +0100 [thread overview]
Message-ID: <CACf-nVeNV7NHaFKp976=Ln29CBbCFHcZ3kdQ4AorEcMMZDL4pQ@mail.gmail.com> (raw)
In-Reply-To: <20231011222728.GC518221@coredump.intra.peff.net>
Hi Jeff,
On Wed, 11 Oct 2023 at 23:27, Jeff King <peff@peff.net> wrote:
> I think this is a reasonable thing to have.
Thanks for taking a look
> Generating the json output isn't entirely trivial (and certainly
> involves allocations), but we throw it away unused if tracing isn't
> enabled. Maybe we'd want something like:
>
> if (!trace2_is_enabled())
> return;
>
> at the top of the function? It looks like other callers of
> jw_object_begin() have a similar issue, and this is probably premature
> optimization to some degree. It just feels like it should be easy for
> tracing to be zero-cost (beyond a single conditional) when it's
> disabled.
This definitely makes sense to me. Will add to a v2.
Thanks, Rob :)
next prev parent reply other threads:[~2023-10-11 22:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 16:04 [PATCH] upload-pack: add tracing for fetches Robert Coup via GitGitGadget
2023-10-11 21:26 ` Taylor Blau
2023-10-11 21:32 ` Taylor Blau
2023-10-11 22:33 ` Robert Coup
2023-10-11 22:27 ` Jeff King
2023-10-11 22:36 ` Robert Coup [this message]
2023-10-17 21:12 ` [PATCH v2] " Robert Coup via GitGitGadget
2023-10-23 18:28 ` Robert Coup
2023-10-23 18:55 ` Jeff King
2023-10-30 20:25 ` Taylor Blau
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='CACf-nVeNV7NHaFKp976=Ln29CBbCFHcZ3kdQ4AorEcMMZDL4pQ@mail.gmail.com' \
--to=robert@coup.net.nz \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=peff@peff.net \
/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).