-
Notifications
You must be signed in to change notification settings - Fork 44
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
High memory usage (possible memory leak) #70
Comments
I'm seeing this problem too. I was able to narrow it down to a specific piece of code. Steps I took to narrow it down:
This was the code that was giving me issue. Seems related to facebook/flow#3370. let createRelationshipPaths = (path = "", rels = []) => {
return rels.length
? rels.reduce((acc, [name, nested]) => {
return [
...acc,
...createRelationshipPaths(path ? `${path}.${name}` : name, nested)
];
}, path ? [path] : [])
: [path];
}; After narrowing down to the file and this specific piece of code I was able to get it to work without hanging by annotating the function's return value. let createRelationshipPaths = (path = "", rels = []): string[] => {
// This fixes it --------------------------------------^
return rels.length
? rels.reduce((acc, [name, nested]) => {
return [
...acc,
...createRelationshipPaths(path ? `${path}.${name}` : name, nested)
];
}, path ? [path] : [])
: [path];
}; Version: v0.45.0 |
I'm seeing the same regardless of version - tested all from v0.40.0 to v0.46.0. Just a thought but should this be raised against flow itself rather than this binary? There appear to be lots of similar issues there, for example facebook/flow#3370. |
I found one more way around, in my case even if I'll ignore |
I am seeing this too and often times it gives me such memory pressure that it is not even improving my developer experience. |
I had this issue while using flow-typed and was able to fix it by removing the flow-typed directory and re-installing. |
This is almost certainly still a problem. has anyone had any success in reducing the memory leak / footprint of using flow? Particularly noticed when using with VS Code |
This caused my Macbook pro to crash. After that crash I got around 10 kernel panics the following few days, they didn't stop until I reset the smc. This issue still exists where flow-bin consumes all vitual memory and max on cpu. My app is basically a react-native create-app. |
Have you tried using lazy modes? Start the server with |
Either this has been fixed, or is unlikely to be fixed in the near future. I'm closing this issue. |
This seems to happen regulary... and unfortunately I can't provide much information (mostly because I don't know where to start)
Still I'm trying to attach as much information as I can gather:
I'm also attaching a sample taken with the OSX dialog.
Sample of flow.txt
By the end of writing this post flow is now consuming >9Gb of memory:
The text was updated successfully, but these errors were encountered: