ISISComputingGroup / ISISComputingGroup/IBEX
DBSRV/GUI: Reduce cpu load by DBSRV
- Dominant language
- No language data
- Stars
- 6
- Forks
- 2
- Avg merge
- 16h 40m
- Merged PRs (30d)
- 2
Description
As a developer I would like the PVs not to trigger a monitor every second even if the PV hasn't changed, I would also like a single SQL query if possible so the database is less loaded. Finally, think about how often we need to poll the database. This should reduce the cpu load of DBSRV.
See #4648 which may need a different design in the DBSRV.
### Acceptance Criteria
1. PV IOC information triggers a monitor only on content change not every second
1. Poll of database is done on a sensible polling time
### Notes
It maybe that the number of PVs can be reduced so that more information is put into a smaller number of PVs. The current pvs are (`CS:BLOCKSSERVER:{}`):
- `PVS:ALL`
- `PVS:INTEREST:HIGH`
- `PVS:INTEREST:MEDIUM`
- `PVS:INTEREST:FACILITY`
- `PVS:ACTIVE`
These should not update every second the code to do this is `inst_server/DatabaseServer/database_server.py` ln 191 (in DBSVR).
I think the filter in the GUI is slow because it takes the list of all PVs and filters it by the list of interest X PVs and active. This is an `n`x`m` time filter which is quite big. I would suggest the all list has metadata added which is interest level and IOC. The list is then filtered by interest and IOCs that appear in `IOCS` PV. But please think about this yourself.
Code in the GUI is `uk.ac.stfc.isis.ibex.ui.configserver.editing.pvs.PVSelectorPanel.setConfig` the slow bits appear to be:
- `blockPVTable.setRows(config.pvs());`
- `selectionChanged` on source change
- `selectionChanged` on interest change
and possibly the refresh function in `uk.ac.stfc.isis.ibex.ui.configserver.editing.pvs.PVSelectorPanel.addFilterListener`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.