All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Markus Hitter <mah@jump-ing.de>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>,
	Paul Mackerras <paulus@ozlabs.org>
Subject: Re: [PATCH 0/3] gitk: memory consumption improvements
Date: Tue, 08 Nov 2016 13:37:38 -0800	[thread overview]
Message-ID: <xmqqtwbhbql9.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <de7cd593-0c10-4e93-1681-7e123504f5d5@jump-ing.de> (Markus Hitter's message of "Mon, 7 Nov 2016 19:54:28 +0100")

Markus Hitter <mah@jump-ing.de> writes:

> List, Paul,
>
> after searching for a while on why Gitk sometimes consumes
> exorbitant amounts of memory I found a pair of minor issues and
> also a big one: the text widget comes with an unlimited undo
> manager, which is turned on be default. Considering that each line
> is inserted seperately, this piles up a huuuge undo stack ... for
> a read-only text widget. Simply turning off this undo manager
> saves about 95% of memory when viewing large commits (with tens of
> thousands of diff lines).

You made me laugh crazy hard while in a waiting room in a clinic
yesterday with the cover letter; people around gave me a strange
look but I couldn't help.

This is a single liner with the largest gain in the history of this
project.  Very well spotted.

Are all semi-modern Tcl/Tk in service have this -undo thing so that
we can pass unconditionally to the text widget like the patch does?

If we had to do this conditionally, that robs the fun of "just
adding 8 bytes to the source to reduce 1+GB memory consumption", but
even if we had to go conditional, this is a great find.

Well done.

  parent reply	other threads:[~2016-11-08 21:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 18:54 [PATCH 0/3] gitk: memory consumption improvements Markus Hitter
2016-11-07 18:57 ` [PATCH 1/3] gitk: turn off undo manager in the text widget Markus Hitter
2016-11-07 19:01   ` [PATCH 2/3] gitk: remove closed file descriptors from $blobdifffd Markus Hitter
2016-11-07 19:03     ` [PATCH 3/3] gitk: clear array 'commitinfo' on reload Markus Hitter
2016-11-07 22:13   ` [PATCH 1/3] gitk: turn off undo manager in the text widget Jacob Keller
2016-11-08 21:37 ` Junio C Hamano [this message]
2016-11-09 12:39   ` [PATCH 0/3] gitk: memory consumption improvements Markus Hitter
2016-11-09 23:04     ` Junio C Hamano
2016-12-12  9:51 ` Paul Mackerras

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=xmqqtwbhbql9.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mah@jump-ing.de \
    --cc=paulus@ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.