On Sun, May 8, 2016 at 4:54 PM, Stephan Eggermont <stephan@stack.nl> wrote:
On 08-05-16 09:59, stepharo wrote:
We did an experience by trying to remove the valueHolder is >
ButtonPresenter but it led to refresh problem when we want to update > the widget.
If we want to have such fine-grained change propagation with a NewValueHolder for each widgetproperty, we need a much more lightweight announcement proces. NewValueHolder initializes a boolean lock and an Announcer. The announcer initializes a SubscriptionRegistry. The subscriptionregistry initializes a Semaphore and an IdentitySet. An identityset initializes with a tally and a size of 5. If we know most valueholders never need to propagate a change, and most of the others only to one subscriber, we should introduce some null/one objects.
We should have metrics for this⦠otherwise seeing what's the actual impact is a guesswork. Most ValueHolders will have at least (and usually) one subscriber â the adapter. But a lightweight announcer might be better. Or use a different mechanism, although I have no idea what kind.
Alternatively, we could propagate change at the widget level instead of the property.
So Spec would talk to Adapter? That's exactly what we are trying to avoid.