flow/flow-for-vscode

Extremely slow performance

ospfranco opened this issue · 2 comments

Hey, this could be related to #414 but on some of my files the performance absolutely tanks

Screen.Recording.2021-08-18.at.14.45.17.mov

It also makes my m1 machine super hot... using lazyMode: fs and useLSP: true, is there any tips you could offer that would improve the situation?

I had this problem, I assume because it auto-upgraded to the latest version, which checks continuously on unsaved files. I ended up downgrading to version 1.9.2.

As it turns out flow didn't do "anything" wrong. Unfortunately depending on your import structure excessive file checking might occur. Here is how I tried to debug my problem:

https://ospfranco.com/post/2021/08/25/how-to-visualize-flowtype-dependency-tree/

One possible mitigation is enabling types-first mode:

https://flow.org/en/docs/lang/types-first/#:~:text=In%20types%2Dfirst%2C%20Flow%20extracts,It%20improves%20error%20reliability.