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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: speed up got patch
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 13 May 2022 13:28:53 +0200

Download raw body.

Thread
  • Omar Polo:

    speed up got patch

    • Stefan Sperling:

      speed up got patch

On Fri, May 13, 2022 at 01:01:14PM +0200, Omar Polo wrote:
> The worktree schedule functions are quite heavy because they open the
> fileindex and sync the changes afterwards.  Opening, syncing and closing
> the fileindex in a loop once per every patch wastes a lot of time for no
> real gain.

The initial implementation of rebase had the same problem. Opening
and syncing the fileindex in /usr/src takes time, which is why it
is done only just once by most (if not all) commands by now.

So your approach to fix this makes sense, and matches what has
already been done elsewhere.
 
> P.S.: I don't particularly like the got_patch_state name I came up with
>       but don't have any better ideas.

If you don't like this, you could pass struct got_fileindex * and
char *fileindex_path arguments around as needed, without putting
them into a wrapper struct.