How would you approach optimizing a slow-running Python application?

Technical