Skip to content
  • Jameson Rollins's avatar
    don't update cas driver PV values after every setitem · 0478c9e6
    Jameson Rollins authored
    Here we do batch updating of the driver PVs, rather than after every setitem.
    driver.updatePVs is a heavy operation, proving to be most of the CPU load
    during profiling.  Batch updating reduces the number of updatePVs calls by an order of magnitude, from
    roughly 100 per cycle (when coupled with cas.__setitem__) to roughly 10 in
    the current implementation.
    
    Unfortunately there's some way that updatePVs seems to affect client writes
    that is not yet understood.  We should only have to call updatePVs twice in
    the main loop to push out all updates.  But some weird behavior was observed,
    where client writes didn't seem to take affect.  This needs to be investigated
    more, but in the mean time calling updatePVs around process seems to behave
    ok.
    
    The ordering in the channel updates as seen by the tests changes slightly,
    since all updates happen as a batch rather than individually when they are
    set.
    0478c9e6