git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGit RFC] Make "stg branch -l" faster by getting all git config information in one call

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Dec 13, 2007, 15:38 UTC
Message-ID
<b0943d9e0712130738s18ad303fu17a8412097377900@mail.gmail.com>
In-Reply-To
<87lk7yr7ib.fsf@lysator.liu.se>
On 13/12/2007, David Kågedal <davidk@lysator.liu.se> wrote:
Show 16 quoted lines
> "Catalin Marinas" <catalin.marinas@gmail.com> writes:
>
> > On 13/12/2007, David Kågedal <davidk@lysator.liu.se> wrote:
> >> I have a fair amount of branches, and I noticed that "stg branch -l"
> >> takes ridiculously long to finish.
> >
> > I have the same problem.
> >
> >> Maybe someone can help me find a quicker replacement for the
> >> get_protected call?
>
> Hey, why not put the "protected" flag in the config? Then we can get
> it the same way as the other stuff.
>
> Protecting a branch is a configuration action, so it makes sense to
> put it in the config.

Yes, I'm OK with this. The only problem I see is that we have to change the stgit.formatversion and provide an upgrade in the Series object. However, 'stg branch -l' no longer initialises the Series objects and the upgrade won't happen.

The branch command would have to check format version and force the upgrade if it isn't the required one.

BTW, have you run stg-prof to check where it spends most of the time? Is it caused by Python object creation or GIT calls invoked during the Series objects initialisation. If the latter, we can turn some variables into properties and access them lazily.

-- 
Catalin
Previous: David KågedalNext: David Kågedal
Message 7 of 13 in “[StGit RFC] Make "stg branch -l" faster by getting all git config information in one call”
  1. David KågedalDec 13, 2007
  2. git config --get-regexp exit statusDavid Kågedal, Dec 13, 2007
  3. Junio C HamanoDec 13, 2007
  4. Catalin MarinasDec 13, 2007
  5. David KågedalDec 13, 2007
  6. David KågedalDec 13, 2007
  7. Catalin MarinasDec 13, 2007
  8. David KågedalDec 13, 2007
  9. Karl HasselströmDec 13, 2007
  10. Karl HasselströmDec 13, 2007
  11. Catalin MarinasDec 13, 2007
  12. David KågedalDec 13, 2007
  13. Karl HasselströmDec 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.