Skip to content

Commit aa71466

Browse files
committed
clarify difference between tracked and interned structs
1 parent ea07f22 commit aa71466

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/tracked_struct.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,14 @@ pub trait TrackedStructInDb: SalsaStructInDb {
146146
/// This ingredient only stores the "id" fields. It is a kind of "dressed up" interner;
147147
/// the active query + values of id fields are hashed to create the tracked
148148
/// struct id. The value fields are stored in [`crate::function::IngredientImpl`]
149-
/// instances keyed by the tracked struct id. Unlike normal interners, tracked
150-
/// struct indices can be deleted and reused aggressively: when a tracked
151-
/// function re-executes, any tracked structs that it created before but did
152-
/// not create this time can be deleted.
149+
/// instances keyed by the tracked struct id.
150+
///
151+
/// Unlike normal interned values, tracked struct indices can be deleted and reused aggressively
152+
/// without dependency edges on the creating query. When a tracked function is collected,
153+
/// any tracked structs it created can be deleted. Additionally, when a tracked function
154+
/// re-executes but does not create a tracked struct that was previously created, it can
155+
/// be deleted. No dependency edge is required as the lifetime of a tracked struct is tied
156+
/// directly to the query that created it.
153157
pub struct IngredientImpl<C>
154158
where
155159
C: Configuration,

0 commit comments

Comments
 (0)