Optimizing new code in Pull Requests is the best way to ensure that all code you and your team ship is performant in the future. Automating optimization in the Pull Request stage how most teams use Codeflash, to continuously find optimizations for their new code. To scan new code for performance optimizations, Codeflash uses a GitHub Action workflow which runs the Codeflash optimization logic on the new code in every pull request. If the action workflow finds an optimization, it communicates with the Codeflash GitHub App and asks it to suggest new changes to the pull request. This is the most useful way of using Codeflash, where you set it up once and all your new code gets optimized. So setting this up is highly recommended.

Pull Request Optimization 30 seconds demo

Prerequisites

Before you begin, make sure you have:βœ… A Codeflash API key from the Codeflash Web Appβœ… Completed local installation with codeflash initβœ… A Python project with a configured pyproject.toml file

Setup Options

How the Pull Request Optimization Suggestion looks

Codeflash creates a new dependent Pull Request for you to review with the reported speedups, helpful explanation for the optimization and the proof of correctness. The pull request has the code change for you to review and accept. Codeflash PR Review Sometimes it also makes an inline suggestion with the optimization. Codeflash PR Suggestion We hope you enjoy the performance unlock the Pull Request optimization enables.