forked from epfl-lasa/modulo
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Currently, predicates are published at a fixed rate (component rate, or hardcoded rate for controllers) as well as on set_predicate(). It would be much more efficient to only publish predicates on change.
I present here three options in order of preference (last one is the highest one):
- Drop the option of providing a functor as a predicate and just store the current predicate value in one single map. This would require derived components to always use
set_predicatein order to set a predicate value. The advantage of this option is that only one map is required. The disadvantage is that we would remove a neat feature that is being used in multiple components. - Naive approach: simply add a second map that holds the previous predicate value and only publish if the new value is different from the old one.
- Naive approach, in better: add a second map that holds the previous predicate value and only publish if the new value is different from the old one. Additionally, wrap all predicates in a functor, e.g. drop the
PredicateVariantin order to make theget_predicatefunction slightly faster.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels