mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-08-09 21:38:20 +00:00
allow reuse of cached provisional memos within the same cycle iteration (#786)
* test for caching provisional values
* add iteration-count to cycle heads
* CycleHeads insert/extend checks iteration count match
* update iteration count in cycle heads
* all tests passing
* remove debug prints
* just walk active query stack once
* switch to tracking active cycle iterations on ZalsaLocal
* Revert "switch to tracking active cycle iterations on ZalsaLocal"
This reverts commit 4ea3d850b53a449dda7af7ceb4cc565d3a64001c.
* Revert "just walk active query stack once"
This reverts commit 2d7948612be3f411c7787829ff2db74e3a575f0c.
* make ActiveQuery::iteration_count private with accessor
* iterate active query stack in reverse
* use tracing::trace! in hot path
* try a cold annotation on validate_same_iteration
* Revert "try a cold annotation on validate_same_iteration"
This reverts commit 49ceb84bb7
.
This commit is contained in:
parent
395b29d08a
commit
296a8c78da
11 changed files with 180 additions and 51 deletions
|
@ -123,6 +123,9 @@ where
|
|||
if iteration_count > MAX_ITERATIONS {
|
||||
panic!("{database_key_index:?}: execute: too many cycle iterations");
|
||||
}
|
||||
revisions
|
||||
.cycle_heads
|
||||
.update_iteration_count(database_key_index, iteration_count);
|
||||
opt_last_provisional = Some(self.insert_memo(
|
||||
zalsa,
|
||||
id,
|
||||
|
@ -130,7 +133,9 @@ where
|
|||
memo_ingredient_index,
|
||||
));
|
||||
|
||||
active_query = db.zalsa_local().push_query(database_key_index);
|
||||
active_query = db
|
||||
.zalsa_local()
|
||||
.push_query(database_key_index, iteration_count);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue