FormidableLabs / electron-webpack-dashboard

Electron Desktop GUI for Webpack Dashboard
http://formidable.com/blog/2017/introducing-electron-webpack-dashboard/
MIT License
2.71k stars 78 forks source link

While developing with plugin, memory is rapidly consumed #20

Closed dannyrb closed 7 years ago

dannyrb commented 7 years ago

Please provide a description of the bug / issue, and provide the details below:

====================================================================

When including the webpack-dashboard plugin, as I save/develop/rebuild, my computer quickly runs out of memory. If I open Task Manager, I can see many instances of the Node.js running in task manager consuming a large portion of memory.

If I remove webpack-dashboard from my plugins, my memory sits at 50%. I've removed/added the plugin multiple times to verify that the issue persists and is caused by the plugin.

If the issue is visual, please provide screenshots here

====================================================================

Not a visual issue.

Steps to reproduce the problem

====================================================================

Please provide a gist of relevant files

My starting point: https://github.com/vuejs-templates/webpack I add new DashboardPlugin() to the list of plugins for the webpack.dev.conf.js

  1. package.json (specifically the script you are using to start the dashboard)
  2. webpack.config.js
  3. index.js (Your express based dev server, if applicable)

====================================================================

More Details
kenwheeler commented 7 years ago

Are you using the latest versions?

kenwheeler commented 7 years ago

Can you try using 1.0.0-4? Also, can I see a screenshot of your task manager?

dannyrb commented 7 years ago

Task Manager Screen Shot

Each save seems to spawn another process. Memory consumption increases. You can see 10+ Node.js processes running. I'll update to latest and edit in my results.

Edit:

Update to latest. Issue persists. Let me know if there's anything else you'd like me to try/provide.

kenwheeler commented 7 years ago

Interesting, @tptee do you think this is the daemon getting run each time?

kenwheeler commented 7 years ago

@dannyrb just cut a release, can you try npm install webpack-dashboard@v1.0.0-5 and see if its still happening for you?

tibuurcio commented 7 years ago

While using it today at work I noticed the same thing happening. Multiple Node processes being spawned and my computer froze at some point. I'm not sure if I was on 1.0.0-4. Will check it tomorrow.

I was on Ubuntu, please let me know if there's any test I can do to help!

kenwheeler commented 7 years ago

1.0.0-5 of the plugin should do it. The daemon was getting initialized on run, and I changed it to only initialize in the constructor.

dannyrb commented 7 years ago

@next wasn't pulling 1.0.0-5 for me, but install @1.0.0-5 did the trick.

I'm no longer experiencing this issue (thanks for the quick fix, and the awesome plugin). Feel free to close this issue if you're happy with the fix :+1: