It seems the flow-typed/npm/formik_v0.11.x.js libdef file adds a tremendous amount of delay to the Flow server start up time.
The delay occurs during this stage: Please wait. Server is initializing (parsed files 32414):
Here are some quick benchmarks (after running flow stop between tests) using flow 0.72.0:
// Without `formik`
$ flow
No errors!
✨ Done in 88.14s.
// With `formik`
$ flow
No errors!
✨ Done in 167.05s.
@TLadd @AndrewSouthpaw @pilczuk @GAntoine Can you guys think of any reasons why that file performs so poorly? Are there any known bad practices in there?
This came up in the PR as well: https://github.com/flowtype/flow-typed/pull/2171
It's some weird case where flow slows down when using certain built in types, in this case SyntheticEvent.
Other related issues:
https://github.com/facebook/flow/issues/6290
https://github.com/facebook/flow/issues/5856
https://github.com/facebook/flow/issues/5858
can we use any instead for now?
I'm personally fine with that. Little unfortunate, but those two types probably aren't worth the time they cost.
Agreed. Go forth and PR! 😉
Most helpful comment
I'm personally fine with that. Little unfortunate, but those two types probably aren't worth the time they cost.