git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Thoughts on gitk's memory footprint over linux-2.6.git
@ 2011-09-26 19:38 Martin Langhoff
  2011-09-26 22:02 ` Elijah Newren
  2011-11-11 12:44 ` Felipe Contreras
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Langhoff @ 2011-09-26 19:38 UTC (permalink / raw)
  To: Git Mailing List

In an odd turn of affairs, I am managing a bit of kernel development,
and even writing the odd patch myself. As usual, gitk is excellent to
visualize what's new in the tree when developers in the team commit
and push new stuff.

However, I find it extremely annoying over the kernel tree, due to its
memory footprint. It is not the only thing I am running, (Chrome
Browser, Gnome3, Firefox, many gnome Terminal windows, emacs), and
given that I am looking at "just a couple of commits" I don't feel
opening a few gitk instances should be problematic... except that it
is.

Each gitk instance wants to gobble up >1GB of memory! It really wants
to show me the "Linux-2.6.12-rc2(...)Initial git repository build."
commit.

Aren't kernel hackers hurting with this? This box blazes through a
kernel compile, but only has 2GB RAM. Regardless of amount of RAM,
firing up gitk gobbles up >1G and untold CPU cycles.

My tk isn't really up to par, but... here's a stupid idea.

 - In start_rev_list, run git log into a tempfile, and concurrently
open the same file for reading, as fd

 - Read in a bound number of commits, say 10000 ("just" 200MB)

 - If we haven't made it to the end of the file, remember the offset
and keep reading the file, counting matches of /^commit/ to get a
commit count and size the scroll back

 - re-activate the reading as required...

There are of course tricky aspects of concurrent programming at hand.
I am not sure what concurrency model gitk has now, but it does a great
job of not blocking and not getting confused.

Tricky Tk programming, or go buy some RAM? Yeah, I know.

Now why didn't I pack that Tk book when I moved here?




m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-11 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 19:38 Thoughts on gitk's memory footprint over linux-2.6.git Martin Langhoff
2011-09-26 22:02 ` Elijah Newren
2011-09-26 22:07   ` Martin Langhoff
2011-11-11 12:44 ` Felipe Contreras
2011-11-11 14:19   ` Johannes Sixt
2011-11-11 16:04     ` Felipe Contreras

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).