mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-31 21:48:53 -06:00
Merge PR #3121: PERF-CATALOG: a smart album's per-photo test stops storing an answer nothing can read
This commit is contained in:
@@ -514,9 +514,11 @@ pub(crate) fn smart_album_holds(id: crate::AlbumId, photo: crate::PhotoId, match
|
||||
}
|
||||
}
|
||||
}
|
||||
let _forget = Forget(EVALUATING.with_borrow(Vec::is_empty));
|
||||
let outermost = EVALUATING.with_borrow(Vec::is_empty);
|
||||
let _forget = Forget(outermost);
|
||||
let answer = evaluating(id, matches);
|
||||
if let Some(a) = answer {
|
||||
// (the outermost answer would be forgotten as this returns: only what a nested question worked out is kept)
|
||||
if let (Some(a), false) = (answer, outermost) {
|
||||
ANSWERS.with_borrow_mut(|known| known.insert((id, photo), a));
|
||||
}
|
||||
answer.unwrap_or(false)
|
||||
|
||||
Reference in New Issue
Block a user