Skip to content

Patch Release v6.4.2

Latest
Compare
Choose a tag to compare
@ruck314 ruck314 released this 16 Oct 16:25
· 1 commit to main since this release

Pull Requests Since v6.4.1

Enhancement

  1. #1024 - Improve variable update performance

Unlabeled

  1. #1026 - ESROGUE-682 - Make Block.set() with numpy array work with proper array strides

Pull Request Details

Improve variable update performance

Author: Ryan Herbst rherbst@slac.stanford.edu
Date: Fri Sep 27 13:01:50 2024 -0700
Pull: #1024 (50 additions, 19 deletions, 3 files changed)
Branch: slaclab/ESROGUE-683
Jira: https://jira.slac.stanford.edu/issues/ESROGUE-683
Labels: enhancement

Notes:

This PR improves the variable update performance by making the following changes:

  • Do not always check for the existence of a thread specific UpdateTracker object in the tracking list. This check requires an expensive dictionary lookup which previously occurred within a lock context. Instead the access is called as if the entry exists and if this is a new thread the resulting exception is caught and the object is then created inside the necessary lock. This change occurs in both the entry into the updateGroup context and more importantly in the _queueUpdates call.

  • Take advantage of the fact that each UpdateTrack instance is per thread and remove any locking around the update of this object.

  • In the check() call in the UpdateTrack first check the context counter and update period. This check is not expensive as compared to checking the variable list length, which now only occurs when the count and period tests pass.

  • Change the variable listener processing to only occur when the update worker processes the list. In the previous version, every listener for a variable was added with each set or get call which was not necessary. In the new code the listeners are first added to the existing update list before the update calls are made.


ESROGUE-682 - Make Block.set() with numpy array work with proper array strides

Author: Larry Ruckman ruckman@slac.stanford.edu
Date: Wed Oct 16 09:11:46 2024 -0700
Pull: #1026 (70 additions, 16 deletions, 2 files changed)
Branch: slaclab/ESROGUE-682
Jira: https://jira.slac.stanford.edu/issues/ESROGUE-682

Notes:

Description

Previously the Block.setUIntPy() and related methods assumes a contiguous array. This would break with calls such as

arr = np.array([0,1,2,3,4,5])
var.set(np.arr[::2])

All of the underlying set() methods have been updated to properly iterate the numpy array.