Flow-typed: `formik` libdef adds 80s to flow server's start time

Created on 22 May 2018  Â·  4Comments  Â·  Source: flow-typed/flow-typed

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?

libdef question

Most helpful comment

I'm personally fine with that. Little unfortunate, but those two types probably aren't worth the time they cost.

All 4 comments

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! 😉

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ggravarr picture ggravarr  Â·  3Comments

villesau picture villesau  Â·  3Comments

migueloller picture migueloller  Â·  4Comments

callumlocke picture callumlocke  Â·  4Comments

NotTooReact89 picture NotTooReact89  Â·  4Comments