"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: add a diff cache to tog
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 8 Aug 2021 11:04:01 +0200

Download raw body.

Thread
On Sat, Aug 07, 2021 at 11:18:59PM +0200, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > > This patch adds a diff cache to tog.
> > > 
> > > For very large changes computing the list of changed paths and text diffs
> > > can take quite a while. If we keep a couple of temporary files open which
> > > contain generated diff output we can avoid reproducing a diff from scratch
> > > if the user wants to see a diff again which we have already cached.
> > > The cache is keyed on object IDs and diff options.
> 
> Does this solve an actual problem?  I rarely want to view a monster
> diff.  Most of the time I hit it by accident and I don't want to
> see it again.

In that case if helps if you happen to accidentally view the diff again,
e.g. while scrolling around with < and > keys while a diff view is open.

The effect will depend on the repository and the speed of your machine.
On a slow machine, scrolling over commits which touch files like pcidevs
can introduce noticable lag. Faster machines will not see a huge benefit.

In any case, I don't think it hurts to keep a couple of additional files
open for a while. The file descriptors would otherwise remain unused.
And we still respect current resource limits.