Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up reflex CLI imports #2185

Merged
merged 2 commits into from Nov 17, 2023
Merged

Speed up reflex CLI imports #2185

merged 2 commits into from Nov 17, 2023

Conversation

picklelo
Copy link
Contributor

Improves the speed of reflex CLI commands with lazy imports.

Before:

~/code/reflex main ❯ hyperfine "poetry run reflex -v"                                                                                                                                                                                             
Benchmark 1: poetry run reflex -v                                                                                                                                                                                                                 
  Time (mean ± σ):     860.1 ms ± 268.8 ms    [User: 574.2 ms, System: 132.2 ms]                                                                                                                                                                  
  Range (min … max):   746.4 ms … 1623.6 ms    10 runs   

After:

~/code/reflex nikhil/lazy2 ❯ hyperfine "poetry run reflex -v"                                                                                                                                                                                     
Benchmark 1: poetry run reflex -v                                                                                                                                                                                                                 
  Time (mean ± σ):     478.0 ms ±  17.0 ms    [User: 320.9 ms, System: 86.3 ms]                                          
  Range (min … max):   460.2 ms … 516.4 ms    10 runs

@martinxu9
Copy link
Contributor

Tested deploying with the PR, some commands are visibly faster than before. Very nice.

@picklelo picklelo merged commit c3e652b into main Nov 17, 2023
45 checks passed
Alek99 pushed a commit that referenced this pull request Nov 20, 2023
@masenf masenf deleted the nikhil/lazy2 branch December 6, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants