Fixing a caching mistake in find_alive
Dependencies
- [2]
JQR4Q2NKFixing a cache miss/unwrap in find_alive for vertices that have been split during insertion - [3]
RSFUX6MLCorrect find_alive cache system - [4]
I24UEJQLVarious post-fire fixes - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [6]
YN63NUZOSanakirja 1.0 - [*]
7NSTS6PKAdding a cache in find_alive to improve performance in some cases - [*]
VO5OQW4WRemoving anyhow in libpijul
Change contents
- edit in libpijul/src/find_alive.rs at line 3[8.1357][9.32357]
// use std::collections::hash_map::Entry; - edit in libpijul/src/find_alive.rs at line 24
cache.insert(*vertex, Some(alive.clone())); - edit in libpijul/src/find_alive.rs at line 26
cache.insert(*vertex, Some(alive.clone())); - edit in libpijul/src/find_alive.rs at line 114
// Each element of the stack is a pair of (1) an edge pointing to// the position we want to visit next and (2) optionally, a set of// alive vertices found until now.// Every time we find an alive vertex, we add it to the sets of// each element on the path to that vertex. - edit in libpijul/src/find_alive.rs at line 132
debug!("pop {:?} {:?}", elt, alive); - edit in libpijul/src/find_alive.rs at line 138
cache.insert(vertex, (Some(alive), files_)); - edit in libpijul/src/find_alive.rs at line 140
cache.insert(vertex, (Some(alive), files_)); - replacement in libpijul/src/find_alive.rs at line 145
} else {if !visited.insert(elt.dest()) {continue;}stack.push((elt, Some((HashSet::new(), HashSet::new()))));};} - edit in libpijul/src/find_alive.rs at line 161
}if visited.insert(elt.dest()) {stack.push((elt, Some((HashSet::new(), HashSet::new())))); - edit in libpijul/src/find_alive.rs at line 165
continue;}if !visited.insert(elt.dest()) { - edit in libpijul/src/find_alive.rs at line 171
stack.push((elt, Some((HashSet::new(), HashSet::new())))); - edit in libpijul/src/find_alive.rs at line 244
debug!("just push");