From 3ce4a51b04c3161a4858e0e3bcaf8e8fcbf7e823 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Fri, 20 Mar 2020 19:24:02 +0100 Subject: [PATCH] reduce slow git-calls further --- README.md | 2 +- src/app.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fb25a2b..cebace46 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ gitui * [x] inspect diffs * [x] commit * [x] [input polling in thread](assets/perf_compare.jpg) -* [ ] only ask git when necessary. maybe in a worker thread? +* [x] only ask git when necessary. maybe in a worker thread? * [ ] show content of new files * [ ] discard untracked files (remove) * [ ] use [notify](https://crates.io/crates/notify) to watch git diff --git a/src/app.rs b/src/app.rs index b89c27b0..2bedc3a8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -143,11 +143,11 @@ impl App { if !self.commit.is_visible() { if self.index.event(ev) { - self.update(); + self.update_diff(); return; } if self.index_wd.event(ev) { - self.update(); + self.update_diff(); return; } if self.diff.event(ev) { @@ -318,7 +318,7 @@ impl App { } }; - self.update(); + self.update_diff(); } }