`Step.run` calls `gc.collect` near the beginning of the function body: https://github.com/spacetelescope/stpipe/blob/9952c365458fc3f01839a912b62ab6c637dc9179/src/stpipe/step.py#L418 As it's likely that `Step.process` will result in allocations, it may be more useful to move this call to after `Step.process`.
Step.runcallsgc.collectnear the beginning of the function body:stpipe/src/stpipe/step.py
Line 418 in 9952c36
As it's likely that
Step.processwill result in allocations, it may be more useful to move this call to afterStep.process.