The beam measurement group of Shanghai Synchrotron Radiation Facility (SSRF) has developed a new software package, HOTCAP, for high-speed oscilloscope-based three-dimensional bunch charge and position measurements to investigate the transient process of injection and beam instability in a high-energy electron storage ring. However, the software package does not specifically optimize the algorithm efficiency for data-processing speed.
This study aims to optimize real-time performance of the HOTCAP software so that the time required to complete the processing and analysis of single-measurement data fully satisfies the requirements of real-time measurements.
An operational efficiency test and algorithm optimization were conducted for each functional module of the HOTCAP software package to improve the overall performance. The specific time consumption data of each module in the processing flow were calculated, and the most time-consuming algorithm for extracting the three-dimensional position of charges was specially optimized to reduce duplicate calculations by using cached variables.
After optimization, the processing time of the single-measurement data is reduced by more than 10 times.
The optimized HOTCAP software by this study satisfies the real-time monitoring and online data release requirements of the high-energy electron storage ring status.