From: "Torsten Bögershausen" <tboegi@web.de>
To: Haritha via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Haritha <harithamma.d@ibm.com>
Subject: Re: [PATCH v3] Fix to avoid high memory footprint
Date: Fri, 26 Jul 2024 11:55:35 +0200 [thread overview]
Message-ID: <20240726095535.GA32544@tb-raspi4> (raw)
In-Reply-To: <pull.1744.v3.git.git.1721975234873.gitgitgadget@gmail.com>
On Fri, Jul 26, 2024 at 06:27:14AM +0000, Haritha via GitGitGadget wrote:
> From: D Harithamma <harithamma.d@ibm.com>
>
> When Git adds a file requiring encoding conversion and tracing of encoding
> conversion is not requested via the GIT_TRACE_WORKING_TREE_ENCODING
> environment variable, the `trace_encoding()` function still allocates &
> prepares "human readable" copies of the file contents before and after
> conversion to show in the trace. This results in a high memory footprint
> and increased runtime without providing any user-visible benefit.
>
> This fix introduces an early exit from the `trace_encoding()` function
> when tracing is not requested, preventing unnecessary memory allocation
> and processing.
>
> Signed-off-by: Harithamma D <harithamma.d@ibm.com>
> ---
> Fix to avoid high memory footprint
>
This head line
> Fix to avoid high memory footprint
does not tell to much when and how it happens.
The word "fix" is not realy needed (in this project).
Something like
"convert: avoid high memory footprint"
will tell the reader, that only the convert functionality is affected
by this patch.
Thinking about it, another suggestion may be:
convert: Reduce memory allocation when trace_encoding() is not used
If someone browses through the whole history of Git, this is easier to
follow.
The exact wording may be improved, important would be to have "convert:"
as the first keyword, and then "memory allocation" and "trace_encoding()"
give hints, what this is all about in one line.
And the rest looks good.
next prev parent reply other threads:[~2024-07-26 9:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 8:03 [PATCH] Fix to avoid high memory footprint Haritha via GitGitGadget
2024-07-17 6:16 ` Jeff King
2024-07-24 11:45 ` [PATCH v2] " Haritha via GitGitGadget
2024-07-24 21:41 ` Junio C Hamano
2024-07-24 22:16 ` Jeff King
2024-07-26 6:27 ` [PATCH v3] " Haritha via GitGitGadget
2024-07-26 9:55 ` Torsten Bögershausen [this message]
2024-07-26 14:00 ` [PATCH v4] convert: " Haritha via GitGitGadget
2024-07-30 3:42 ` [PATCH v5] convert: return early when not tracing Haritha via GitGitGadget
2024-07-31 2:42 ` Junio C Hamano
2024-07-31 9:32 ` Haritha D
2024-07-31 13:33 ` [PATCH v6] " Haritha via GitGitGadget
2024-07-26 15:06 ` [PATCH v3] Fix to avoid high memory footprint Junio C Hamano
2024-07-26 15:12 ` Junio C Hamano
2024-07-30 3:41 ` Haritha D
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240726095535.GA32544@tb-raspi4 \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=harithamma.d@ibm.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.
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 NNTP newsgroup(s).