{"thread":{"id":"27456","subject":"gitk normal use on linux repo and severe memory pressure","startedAt":"2011-05-25T15:20:24Z","lastAt":"2011-05-25T18:27:34Z","messageCount":4,"participants":["Martin Langhoff","Andreas Schwab","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"168669","messageId":"BANLkTinrj2AOCMMWazf2F4eKy7Sy56K0vg@mail.gmail.com","threadId":"27456","inReplyTo":null,"subject":"gitk normal use on linux repo and severe memory pressure","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2011-05-25T15:20:24Z","receivedAt":"2011-05-25T15:20:24Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"An anecdotical report: Right today, I fired up gitk on a linux-2.6.39\ncheckout to review some new patches. While discussing the patches with\nother developers on irc, my machine (arguably, RAM-constrained at 1GB)\nstarted to hit swap heavily.\n\nTook a couple of minutes to kill it and get the machine back to a\nusable state. This is on F-14, git v1.7.4.4 .\n\nLinus' early instinct that people care about the recent patches (so\ngitk and git log better show them immediately) was spot on. Now the\nproblem is that gitk continues to walk history regardless of user\ninterest. It gobbled up a ton of memory while I never went deeper than\n20 commits.\n\nI am tempted to set a global config option limiting gitk to a couple\nthousand commits, but it's not really the right solution. If I am\ntrawling older history, I'll hit the limit and have to close gitk and\nreopen overriding the parameter.\n\nAre there efforts afoot to teach gitk to read in _some_ history and\npause, continuing if the user scrolls down? Not sure if searches are\ndone in-memory in gitk -- which probably complicates things.\n\ncheers,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- Software Architect - OLPC\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"168684","messageId":"m2pqn667f9.fsf@igel.home","threadId":"27456","inReplyTo":"BANLkTinrj2AOCMMWazf2F4eKy7Sy56K0vg@mail.gmail.com","subject":"Re: gitk normal use on linux repo and severe memory pressure","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-05-25T17:01:30Z","receivedAt":"2011-05-25T17:01:30Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Martin Langhoff <martin.langhoff@gmail.com> writes:\n\n> I am tempted to set a global config option limiting gitk to a couple\n> thousand commits, but it's not really the right solution. If I am\n> trawling older history, I'll hit the limit and have to close gitk and\n> reopen overriding the parameter.\n\nYou can start gitk with --max-count=N and if you need more commits you\ncan edit the current view to increase that number.  No need to restart\ngitk.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"168686","messageId":"BANLkTikoqxRBMQvKRsJ0-vNd+cW5k-jQWw@mail.gmail.com","threadId":"27456","inReplyTo":"m2pqn667f9.fsf@igel.home","subject":"Re: gitk normal use on linux repo and severe memory pressure","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2011-05-25T17:17:49Z","receivedAt":"2011-05-25T17:17:49Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Wed, May 25, 2011 at 1:01 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> You can start gitk with --max-count=N\n\nOr --since=2.weeks.ago. Of course I can -- and sometimes do. But gitk\ndefaults to OOMing my box if I forget to do so on a large repo.\n\n> and if you need more commits you\n> can edit the current view to increase that number.  No need to restart\n> gitk.\n\nAh, that's news to me! I just tried it and it's... awkward. In fact,\nthe dialog box seems to be missing an 'apply' button.\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- Software Architect - OLPC\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"168697","messageId":"20110525182734.GA26407@sigill.intra.peff.net","threadId":"27456","inReplyTo":"BANLkTinrj2AOCMMWazf2F4eKy7Sy56K0vg@mail.gmail.com","subject":"Re: gitk normal use on linux repo and severe memory pressure","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-25T18:27:34Z","receivedAt":"2011-05-25T18:27:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 25, 2011 at 11:20:24AM -0400, Martin Langhoff wrote:\n\n> An anecdotical report: Right today, I fired up gitk on a linux-2.6.39\n> checkout to review some new patches. While discussing the patches with\n> other developers on irc, my machine (arguably, RAM-constrained at 1GB)\n> started to hit swap heavily.\n\nYeah, gitk on linux-2.6 tops out at around 1.6GB on my machine. Ouch.\nThat's 6-7K per commit. In git.git, it's similar (7-8K per commit).\nFor comparison, all of \"git log --pretty=raw\" for linux-2.6 is only\nabout 180M, or ~0.7K per commit.\n\nObviously there is going to be some overhead with organizing the data,\nbut that is really quite a lot.\n\n> Are there efforts afoot to teach gitk to read in _some_ history and\n> pause, continuing if the user scrolls down? Not sure if searches are\n> done in-memory in gitk -- which probably complicates things.\n\nNot that I know of. But it seems like there might be some room to\noptimize gitk's storage. I know absolutely nothing about how commits are\nstored now, though, so it's possible I'm completely wrong.\n\n-Peff\n"}]}