cirho / powerline-rust

powerline-shell written in Rust
MIT License
51 stars 25 forks source link

Use `libgit2` instead of parsing the `git` command #7

Closed ArniDagur closed 5 years ago

ArniDagur commented 6 years ago

This is what jD91mZM2/powerline-rs does to increase performance. The git2 crate can be used.

cirho commented 6 years ago

I will look into it.

cirho commented 6 years ago

I have done some testing and from the results it seems that using git2 is never better than current solution and much often worse. With git2 code looks much cleaner and I would really like to get rid off parsing command output, but not for performance.

If you give me some benchmarks proving your statement I will consider rewriting.

For testing I simply pasted code from D91mZM2/powerline-rs and modified it to work with my codebase. I can provide you with git2 branch, but tomorrow.

ArniDagur commented 6 years ago

Powerline-rs's README.md said that it increases performance; it made sense so I just took their word for it. I haven't done any benchmarks myself.