From: Paul Mackerras <paulus@ozlabs.org>
To: Stefan Beller <sbeller@google.com>
Cc: Markus Hitter <mah@jump-ing.de>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: gitk: avoid obscene memory consumption
Date: Sat, 5 Nov 2016 22:08:45 +1100 [thread overview]
Message-ID: <20161105110845.GA4039@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <CAGZ79kbavzGJ2sAcz5heg+BO+tZ=TgtrhxMH1-kqeJUpNNavyw@mail.gmail.com>
On Fri, Nov 04, 2016 at 03:45:09PM -0700, Stefan Beller wrote:
> On Fri, Nov 4, 2016 at 12:49 PM, Markus Hitter <mah@jump-ing.de> wrote:
> >
> > Hello all,
>
> +cc Paul Mackeras, who maintains gitk.
Thanks.
> >
> > after Gitk brought my shabby development machine (Core2Duo, 4 GB RAM, Ubuntu 16.10, no swap to save the SSD) to its knees once more than I'm comfortable with, I decided to investigate this issue.
> >
> > Result of this investigation is, my Git repo has a commit with a diff of some 365'000 lines and Gitk tries to display all of them, consuming more than 1.5 GB of memory.
> >
> > The solution is to cut off diffs at 50'000 lines for the display. This consumes about 350 MB RAM, still a lot. These first 50'000 lines are shown, followed by a copyable message on how to view the full diff on the command line. Diffs shorter than this limit are displayed as before.
That sounds reasonable.
>
> Bikeshedding: I'd argue to even lower the number to 5-10k lines.
I could go with 10k.
>
> >
> > To test the waters whether such a change is welcome, here's the patch as I currently use it. If this patch makes sense I'll happily apply change requests and bring it more in line with Git's patch submission expectations.
>
> I have never contributed to gitk myself,
> which is hosted at git://ozlabs.org/~paulus/gitk
> though I'd expect these guide lines would roughly apply:
> https://github.com/git/git/blob/master/Documentation/SubmittingPatches
Paul.
next prev parent reply other threads:[~2016-11-05 11:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 19:49 gitk: avoid obscene memory consumption Markus Hitter
2016-11-04 22:45 ` Stefan Beller
2016-11-05 11:08 ` Paul Mackerras [this message]
2016-11-06 10:28 ` Markus Hitter
2016-11-06 20:33 ` Jacob Keller
2016-11-07 4:11 ` Paul Mackerras
2016-11-07 13:43 ` Markus Hitter
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=20161105110845.GA4039@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=git@vger.kernel.org \
--cc=mah@jump-ing.de \
--cc=sbeller@google.com \
/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).