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

Speeding up git stash - help needed

From
Utsav Shah <utsav@dropbox.com>
Date
Oct 25, 2019, 03:05 UTC
Message-ID
<CAPYzU3OEjjFgRrzAM04O3Dmg78FLo=n1X+EU-D_SoThKmiZtsA@mail.gmail.com>

There's been some work to improve the performance of commands using fsmonitor to skip unnecessary lstats. This has worked wonderfully for git status on our repository, and I'm trying to see if we can extend that to more commands.

A profile of git stash on our repository shows a fair bit of time is spent in the "git reset --hard" that happens at the end. Most of the time there is spent running lstat in unpack-trees.c -> traverse_trees -> oneway_merge, which is a fairly generic function and used in a few places.

Is there a sane way to try skipping those lstats? Does anyone have an approach they'd recommend? Or is it possible to skip the git reset --hard in some way? Any suggestions would be welcome.

Message 1 of 1 in “Speeding up git stash - help needed”
  1. Utsav ShahOct 25, 2019

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.