Steps to reproduce:
1. Schedule a large number of upcoming recordings (e.g. 3000+)
2. Schedule a set of new recordings (e.g. 50 in a series) in a group
The action to schedule new recordings is extremely slow (e.g. 30+min to complete). Other actions that involve updating workflows are also extremely slow.
Response time < 60s for group scheduling.
WorkflowServiceImpl.java includes this line for updating statistics that are provided by JMX:
The method getHoldWorkflows() reads every single upcoming scheduled recording into memory, as these are workflows in PAUSED state.
This causes extremely high memory usage, frequent GC activity, and slow response times.