facebook / sapling

A Scalable, User-Friendly Source Control System.

Home Page:https://sapling-scm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`sl status` is too slow for shell prompts

ammario opened this issue · comments

I'm trying to use sl status in my shell prompt, but the command consistently takes 400ms whereas git status in the same repo takes 70ms.

I'm running it on coder/coder and my fish prompt source is here.

agreed. It's better just to read the .sl/ directory directly. This is what we do in our zsh and bash prompt

I'm not familiar with fish, but hopefully you can use scm-prompt.sh as inspiration for your fish prompt.

Not to detract from your point that sl status is slow. We should make it faster.

Note: without eden, git status might be faster than sl status, but note that fast git prompts also avoid calling git. They do similar techniques as Sapling's suggested prompt

Thanks for sharing.

Unfortunately it seems like you still need sl status to get the dirty state (which is very important to me), so the .sl/ tricks only shaves ~100ms (30%) off.