MDL-39488 Lesson Module: Improve code performance