{"thread":{"id":"37940","subject":"Re: tig: Improving startup time and interactivity","startedAt":"2014-11-12T14:35:38Z","lastAt":"2014-11-12T14:35:38Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"251757","messageId":"CAFuPQ1Lm95ztfa3wOZ4LQD05XdV-30UKr4Y9+HoHYbQyw9qj-g@mail.gmail.com","threadId":"37940","inReplyTo":"20141111085014.GA26147@linux.vnet.ibm.com","subject":"Re: tig: Improving startup time and interactivity","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2014-11-12T14:35:38Z","receivedAt":"2014-11-12T14:35:38Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Tue, Nov 11, 2014 at 3:50 AM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:\n> Hi Jonas,\n\nHI Dominik,\n\nGood to hear from you.\n\n> working on a relatively old machine with a crypted disk, there are\n> really two performance problems with tig on large repos like gcc\n> or the Linux kernel.  I wonder what would be necessary to improve\n> these two problems:\n>\n>  1) Firing up tig for the first time in the kernel repo, the screen\n>     goes blank for about a minute.  After that it comes up\n>     quickly.  This is probably caused by decrypting lots of\n>     on-disk-objects.\n\nYou are not alone at reporting this problem. The main reason is that\nwhen the revision graph is enabled, tig automatically passes\n--topo-order to git-log. This commit order seems to cause quite a slow\ndown before the first commits are available in the output in the Linux\nkernel repo, I assume, due to its many merges.\n\nI recently added an option to disable the automatic forcing of\ntopological commit order. So assuming you are using tig from current\nmaster, you can do this using `set main-view-commit-title-graph =\nno-topo`, but I will probably move this setting to another option\nbefore the next release (so if it breaks take a look at the NEWS\nfile). Alternatively you can disable the revision graph completely\nusing `set main-view-commit-title-graph = no`.\n\nBefore the next commit I plan to also investigate whether tig can\nfirst load a screen full of commits without --topo-order and then\nrestart git-log, so the main view has content faster.\n\n>  2) When I cherry pick commits inside tig, it reloads the whole\n>     commit history of the active branch before tig accepts new\n>     commands.\n\nThis should should be able to disable this behaviour using `set\nrefresh-mode = manual` if you don't want tig to automatically reload\nthe view.\n\n> I guess both issues are caused by tig reading the whole commit\n> history before user input is allowed.  Is there a way to do that\n> in the background, or interrupt loading when the user presses a\n> key, or to load the history in small chunks?\n\nThe loading should already happen while also accepting user input\n(modulo any bugs).\n\n> After all, you're\n> usually interested only in the last 100 commits or so, and there's\n> no need to block the UI while loading the rest.\n\nTrue. Well,  The only part of the loading that is blocking is the\n.git/index refreshing that takes place when display of work tree\nchanges is enabled in the main view (when `set show-changes = yes`).\n\nI will review this again.\n\n> Could you point me to the right source file?  I'm not used to the\n> sources split into multiple files yet.  :-)\n\nTry: tig grep main_open\n\n> Ciao\n\nHave a great day.\n\n-- \nJonas Fonseca\n"}]}