EFFICIENCY: If a new dependency overlaps with an old one, we don't have to recompute the closure.
This commit is contained in:
parent
6cd8007ab0
commit
01eb5854cf
@ -74,7 +74,7 @@ extern Role I_M; //!< special role; precedes all other events always
|
||||
* ---------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Depeventgraph currentdepgraph;
|
||||
Depeventgraph currentdepgraph = NULL;
|
||||
|
||||
/*
|
||||
* Default code
|
||||
@ -497,6 +497,9 @@ dependPushEvent (const int r1, const int e1, const int r2, const int e2)
|
||||
{
|
||||
// change: make new graph copy of the old one
|
||||
dependPushGeneric (dependCopy (currentdepgraph));
|
||||
// really new?
|
||||
if (!isDependEvent (r1, e1, r2, e2))
|
||||
{
|
||||
// add new binding
|
||||
setDependEvent (r1, e1, r2, e2);
|
||||
// recompute closure
|
||||
@ -519,6 +522,7 @@ dependPushEvent (const int r1, const int e1, const int r2, const int e2)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user