Refactoring can be performed after product deployment, before adding updates or new features to existing code, or as part of day-to-day programming work. When the process is carried out after deployment, it's done before developers start on the next project. This is the best time in the software delivery lifecycle to intervene, as developers have maximum availability and more time to work on the changes required by the source code.