Improve performance when polling replies in MessageChannelPartitionHandler #4135
Labels
in: infrastructure
related-to: performance
status: duplicate
Issues that are duplicates of other issues
type: enhancement
Currently a for each loop is used in
MessageChannelPartitionHandler
to poll the partition StepExecutions.When there are lots of partition StepExecutions, the method
org.springframework.batch.core.explore.JobExplorer#getStepExecution
will cause lots of repeated sql query on database. Take a look at the implementation of this method.The JobInstance, JobExecution, JobParameters, JobExecutionContext, and StepExecutions of the JobExecution are queried again and again, which can be simplified in my option.
So can we only query the needed StepExecution in this loop? I believe there will be performance improvement if we can simplify the query.
The text was updated successfully, but these errors were encountered: