Improve memory profile during course grading runs