-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Plugin crashes when trying to stringify a large stat blob #119
Comments
What kind of a crash are you seeing? Would it be possible for you to generate an example repository that is big enough to demonstrate this crash? It would help us in making sure that we've fixed the problem. |
It’s Node running out of memory when calling JSON.stringify due to the size of the stats object.
Closed source and a big project, so I can’t share it unfortunately.
…________________________________
From: Vesa Laakso <notifications@github.com>
Sent: Sunday, October 1, 2017 6:26:23 AM
To: th0r/webpack-bundle-analyzer
Cc: Evan Scott; Author
Subject: Re: [th0r/webpack-bundle-analyzer] Plugin crashes when trying to stringify a large stat blob (#119)
What kind of a crash are you seeing? Would it be possible for you to generate an example repository that is big enough to demonstrate this crash? It would help us in making sure that we've fixed the problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#119 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYZrxpJ7basFIK6t_McY73BrWPyhbxD6ks5sn2jPgaJpZM4PpAUS>.
|
That's why I said generate in "Would it be possible for you to generate an example repository". It would improve the possibility of getting this fixed in a reasonable time frame. |
I have the same since recently, when I added ModuleConcatenationPlugin. I get a Here the stack.
|
No issue when using |
Ohh, so this issue is only happening when you generate a |
absolutly it crashes with current config:
|
Ok, that's relieving to hear! I wasn't sure what part of the plugin crashed, but if it was just the stats stringifying, then this should be pretty straightforward to fix. We're open to accept a PR fixing this. The code in question is this: webpack-bundle-analyzer/src/BundleAnalyzerPlugin.js Lines 64 to 72 in e6fbbe7
It should be OK to mark that function as |
@evan-scott-zocdoc and @hlehmann: Could you test PR #129 by @ryan953 on your local project to see if it fixes your issues?
...and then try to generate the stats file? |
Fix by @ryan953 has been released in v2.10.0 🎉. Upgrading might be a good idea 😉 |
Not sure how big it starts to fail to be honest, but I don't think it's a massive number in terms of MB. It might make sense to adjust this plugin to use a streaming JSON stringifier and async write to disk to help overcome this?
Manifests itself commonly when using ModuleConcatenation on a webpack project with multiple entry points.
The text was updated successfully, but these errors were encountered: