anchor.diff:                  counter=Counter,
                   sync_counter=0,
                   store=Store,
  +                to_broadcast=ToBroadcast,
                   gc_counter=GCCounter}}.
   
   %% @private
   -spec handle_call(term(), {pid(), term()}, #state{}) ->
       {reply, term(), #state{}}.
  +
  +handle_call(perform_broadcast,
  +            _From,
  +            #state{to_broadcast=ToBroadcast0}=State) ->
  +
  +    dict:fold(fun(Id, {Id, Type, Metadata, Value} = Payload, ok) ->
  +                    PeerCount = length(plumtree_broadcast:broadcast_members()),
  +                    log_transmission({broadcast, Payload}, PeerCount),
  +                    Clock = orddict:fetch(clock, Metadata),
  +                    Broadcast = #broadcast{id=Id,
  +                                           clock=Clock,
  +                                           type=Type,
  +                                           metadata=Metadata,
  +                                           value=Value},
  +                    {Time, _Result} = timer:tc(plumtree_broadcast,
  +                                              broadcast,
  +                                              [Broadcast, ?MODULE]),
  +                    lasp_logger:extended("Time to broadcast: ~p", [Time]),
  +                    ok
  +              end, ok, ToBroadcast0),
  +
  +    %% Buffer latest update for that state.
  +    ToBroadcast = dict:new(),
  +
  +    %% Reschedule broadcast.
  +    schedule_broadcast(),
  +
  +    {reply, ok, State#state{to_broadcast=ToBroadcast}};
  +
  +%% Buffer broadcast messages to prevent overload.
  +handle_call({buffer_broadcast, {Id, _Type, _Metadata, _Value} = Payload},
  +            _From,
  +            #state{to_broadcast=ToBroadcast0}=State) ->
  +
  +    %% Buffer latest update for that state.
  +    ToBroadcast = dict:store(Id, Payload, ToBroadcast0),
  +
  +    {reply, ok, State#state{to_broadcast=ToBroadcast}};
   
   %% Reset all Lasp application state.
   handle_call(reset, _From, #state{store=Store}=State) ->
  
positive.code:     end.
  
  %% @private
  schedule_delta_garbage_collection() ->
      case lasp_config:get(mode, state_based) of
          delta_based ->
  
negative.code: %%%===================================================================
  
  %% @private
  broadcast({_Id, _Type, _Metadata, _Value}=Payload) ->
      case lasp_config:get(broadcast, false) of
          true ->
              gen_server:call(?MODULE, {buffer_broadcast, Payload}, infinity);
          false ->
              ok
      end.
  