withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.06k stars 63 forks source link

[workflows]: `fig run` takes time to list the options #2027

Open el opened 1 year ago

el commented 1 year ago

You can see from the screen recording that fig run does not list the options in the autocomplete, and it take time to list them if I run fig run

https://user-images.githubusercontent.com/1488164/201096908-36362e92-48aa-43d5-bfaf-905c858525db.mov

❯ neofetch
                    'c.          eliz@Elizs-MacBook-Pro.local
                 ,xNMM.          ----------------------------
               .OMMMMo           OS: macOS 13.0.1 22A400 arm64
               OMMM0,            Host: MacBookPro18,2
     .;loddo:' loolloddol;.      Kernel: 22.1.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 2 hours, 17 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 48 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8.1
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1728x1117, 3008x1692
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: MesloLGS-NF-Regular 13
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1 Max
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1 Max
       .cooc,.    .,coo:.        Memory: 4518MiB / 32768MiB
mschrage commented 1 year ago

Can your run fig diagnostic?

el commented 1 year ago

Autocomplete now works after the first fig run but running fig run still takes time (~4s)

fig-details:
  - 2.7.8
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Max
  - cores: 10
  - mem: 32.00 GB
os-info:
  - macOS 13.0.1 (22A400)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/eliz
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: 7b5f879b-93f8-4fc2-960a-4f9446bc09d8
    - FIG_HOSTNAME: Elizs-MacBook-Pro.local
    - FIG_TERM: 2.7.8
    - PATH: /opt/homebrew/opt/node@18/bin:/Users/eliz/.local/share/fig/plugins/git-open:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/eliz/.fig/bin:/Users/eliz/.local/bin:
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - FIG_PID: 42331
    - FIG_PARENT: 7b5f879b-93f8-4fc2-960a-4f9446bc09d8
    - FIG_SET_PARENT: 7b5f879b-93f8-4fc2-960a-4f9446bc09d8
mschrage commented 1 year ago

Currently, fig run makes a network request to load all of your workflows. We should add an option to hit the local cache first when listing workflows. cc @chaynabors