{"thread":{"id":"52116","subject":"Speeding up git stash - help needed","startedAt":"2019-10-25T03:05:24Z","lastAt":"2019-10-25T03:05:24Z","messageCount":1,"participants":["Utsav Shah"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"384837","messageId":"CAPYzU3OEjjFgRrzAM04O3Dmg78FLo=n1X+EU-D_SoThKmiZtsA@mail.gmail.com","threadId":"52116","inReplyTo":null,"subject":"Speeding up git stash - help needed","fromName":"Utsav Shah","fromEmail":"utsav@dropbox.com","sentAt":"2019-10-25T03:05:11Z","receivedAt":"2019-10-25T03:05:24Z","isPatch":false,"sender":{"key":"utsav@dropbox.com","avatar":"https://avatars.githubusercontent.com/u/49925333?v=4"},"body":"There's been some work to improve the performance of commands using\nfsmonitor to skip unnecessary lstats. This has worked wonderfully for\ngit status on our repository, and I'm trying to see if we can extend\nthat to more commands.\n\nA profile of git stash on our repository shows a fair bit of time is\nspent in the \"git reset --hard\" that happens at the end. Most of the\ntime there is spent running lstat in unpack-trees.c -> traverse_trees\n-> oneway_merge, which is a fairly generic function and used in a few\nplaces.\n\nIs there a sane way to try skipping those lstats? Does anyone have an\napproach they'd recommend? Or is it possible to skip the git reset\n--hard in some way? Any suggestions would be welcome.\n"}]}