-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actions become substantially slower over time #936
Comments
I'm not sure about
which appeared to clean some things up? |
Had same issue when upgrading to the latest version a while ago. I re-cloned with SL and it's working fine until recently, it's slower again. |
Is your repo a If it's
|
Mine is a I've attached the debug logs for
|
That would be a Could you try the |
Ah sorry, the output is
I do not have watchman installed |
Thanks. It looks normal. Something might have regressed without our notice (non-watchman, non-edenfs use-cases are rare in production). I can have a look when I get time. |
@ianb-pomelo What is the version of Sapling you're using? Are you building
? |
I installed Sapling via Homebrew and am using version Sapling 0.2.20240718-145624-f4e9df48 I tried that command and it was about the same performance as without that config. I have also tried installing watchman and that substantially sped things up so for me I can just use that setup |
I'm using
setting the flag to
|
@quark-zju do you have some suggestions how to work around this, other than re-cloning? |
I have encountered this, too. A quick run under Instruments showed that in my case the issue was due to multi-pack index validation. The issue only appears after some time because originally there is no multi-pack index, as the count of pack files is low. This also means I could fix it temporarily by running git's garbage collection on the The reason it's slow seems to be due to excessive validations on multi-pack index loading as described in libgit2/libgit2#6166 which is fixed in the upstream. Indeed, simply recompiling sapling with the |
Thanks for sharing! @destroycomputers this works for me too!! |
As a temporary solution, you can try disabling multi-pack index by appending to
Then delete the multi-pack index file:
The underlying complexity is with It seems the multi-pack index is causing multiple issues - performance issues reported here, and "object not found" issues reported internally ("not found" by libgit2, but found by |
@quark-zju meanwhile, would it be possible to bump the version of the |
Good catch. I didn't realize we're using an old version. I tried upgrading it but it does not seem as trivial since other 3rd party dependencies in the monorepo (like cargo, sqlite, etc) wants the older version. Upgrading them could be a choice but if it's too hard we might try different approaches. UPDATE: It is more complex than I thought. Let's say it's not feasible to upgrade now. Our plan might be migrating off libgit2. |
Just as a data point, I've ran into this pretty consistently with a large git repo that I've been working in where I get object not found errors after a |
I have a checkout of a git repo in sapling that I have been using for a while and as I've used it more and more, the commands (such as
sl status
andsl
) have been substantially slower. I checked out a new version of the repo with Sapling andsl
is almost 2x slower in my older checkout andsl status
is ~8x slower. I suspect that it has something to do with all the history that I have locally that is hidden. Is there a way to clean up the checkout a bit to remove these stale references that I don't want to bring back? Or do I just have to routinely checkout new copies?The text was updated successfully, but these errors were encountered: