File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
## Fixed
20
20
- do not allow to ignore .gitignore files ([ #825 ] ( https://github.com/extrawurst/gitui/issues/825 ) )
21
21
- crash in shallow repo ([ #836 ] ( https://github.com/extrawurst/gitui/issues/836 ) )
22
+ - fixed performance regression in revlog ([ #850 ] ( https://github.com/extrawurst/gitui/issues/850 ) )
22
23
23
24
## [ 0.16.2] - 2021-07-10
24
25
Original file line number Diff line number Diff line change @@ -66,7 +66,13 @@ impl AsyncTags {
66
66
) -> Result < ( ) > {
67
67
log:: trace!( "request" ) ;
68
68
69
- if !force && ( self . is_pending ( ) || !self . is_outdated ( dur) ?) {
69
+ if !force && self . is_pending ( ) {
70
+ return Ok ( ( ) ) ;
71
+ }
72
+
73
+ let outdated = self . is_outdated ( dur) ?;
74
+
75
+ if !force && !outdated {
70
76
return Ok ( ( ) ) ;
71
77
}
72
78
@@ -77,8 +83,8 @@ impl AsyncTags {
77
83
self . pending . fetch_add ( 1 , Ordering :: Relaxed ) ;
78
84
79
85
rayon_core:: spawn ( move || {
80
- let notify =
81
- Self :: getter ( & arc_last ) . expect ( "error getting tags" ) ;
86
+ let notify = Self :: getter ( & arc_last , outdated )
87
+ . expect ( "error getting tags" ) ;
82
88
83
89
arc_pending. fetch_sub ( 1 , Ordering :: Relaxed ) ;
84
90
@@ -96,14 +102,16 @@ impl AsyncTags {
96
102
97
103
fn getter (
98
104
arc_last : & Arc < Mutex < Option < ( Instant , TagsResult ) > > > ,
105
+ outdated : bool ,
99
106
) -> Result < bool > {
100
107
let tags = sync:: get_tags ( CWD ) ?;
101
108
102
109
let hash = hash ( & tags) ;
103
110
104
- if Self :: last_hash ( arc_last)
105
- . map ( |last| last == hash)
106
- . unwrap_or_default ( )
111
+ if !outdated
112
+ && Self :: last_hash ( arc_last)
113
+ . map ( |last| last == hash)
114
+ . unwrap_or_default ( )
107
115
{
108
116
return Ok ( false ) ;
109
117
}
You can’t perform that action at this time.
0 commit comments