Code Monkey home page Code Monkey logo

Comments (2)

andyfowler avatar andyfowler commented on May 21, 2024

I can confirm that this is an issue in pre-1.7 git. Git previously used git commit --dry-run for git status. In my personal fork, I don't care about the backwards compatibility and get irritated at a slow prompt, but I'll leave it up to Robby. git status gets awkwardly slow on larger repos. Quick benchmark:

for i in {1..10}
do
time git status > /dev/null
time git status -s > /dev/null
done

git status > /dev/null  0.10s user 0.19s system 84% cpu 0.333 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.105 total
git status > /dev/null  0.09s user 0.18s system 90% cpu 0.307 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.106 total
git status > /dev/null  0.09s user 0.18s system 91% cpu 0.304 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.105 total
git status > /dev/null  0.10s user 0.18s system 89% cpu 0.313 total
git status -s > /dev/null  0.03s user 0.06s system 86% cpu 0.105 total
git status > /dev/null  0.09s user 0.18s system 90% cpu 0.306 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.105 total
git status > /dev/null  0.09s user 0.18s system 91% cpu 0.306 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.105 total
git status > /dev/null  0.09s user 0.18s system 90% cpu 0.309 total
git status -s > /dev/null  0.03s user 0.06s system 88% cpu 0.106 total
git status > /dev/null  0.09s user 0.18s system 90% cpu 0.306 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.107 total
git status > /dev/null  0.09s user 0.18s system 91% cpu 0.307 total
git status -s > /dev/null  0.03s user 0.06s system 87% cpu 0.105 total
git status > /dev/null  0.09s user 0.18s system 91% cpu 0.305 total
git status -s > /dev/null  0.03s user 0.06s system 85% cpu 0.106 total

from ohmyzsh.

robbyrussell avatar robbyrussell commented on May 21, 2024

Reverting this change for now. On a large project of mine... I barely notice a difference. Would prefer to keep it inclusive to people who don't have the latest oh-my-zsh for now. Am open to other suggestions as well.

git status > /dev/null 0.03s user 0.06s system 82% cpu 0.102 total
git status -s > /dev/null 0.03s user 0.05s system 86% cpu 0.097 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status -s > /dev/null 0.03s user 0.05s system 97% cpu 0.085 total
git status > /dev/null 0.03s user 0.05s system 82% cpu 0.101 total
git status -s > /dev/null 0.03s user 0.05s system 95% cpu 0.086 total
git status > /dev/null 0.03s user 0.05s system 94% cpu 0.087 total
git status -s > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.085 total
git status -s > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.087 total
git status -s > /dev/null 0.03s user 0.05s system 91% cpu 0.089 total
git status > /dev/null 0.03s user 0.05s system 95% cpu 0.086 total
git status -s > /dev/null 0.03s user 0.05s system 96% cpu 0.085 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status -s > /dev/null 0.03s user 0.05s system 97% cpu 0.086 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status -s > /dev/null 0.03s user 0.05s system 96% cpu 0.085 total
git status > /dev/null 0.03s user 0.05s system 96% cpu 0.086 total
git status -s > /dev/null 0.03s user 0.05s system 97% cpu 0.084 total

from ohmyzsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.