-1

I met a very strange thing.My computer runs gulp really slowly. Each task takes about a minute,like this one enter image description here

gulp watch is also same,

My gulp/node/npm version,enter image description here

My computer configuration, CPU : i7, RAM : 32G, SYSTEm : window10 I do not know where the problem is. Why is my gulp so slow.

Prasanjit Dey
  • 5,914
  • 3
  • 13
  • 15
Twinna
  • 1

1 Answers1

0

We can see that your tasks "js:compile" and "js:minifyCompile" take 54s and 56s respectively to finish so you should find out the problems and improve them if you want your gulp tasks to run faster.

There are few things you can do:

  1. Find out if you are importing too many libraries and/or modules into your javascript bundle which may take too much time to compile them into a single bundle. Remove all libraries/modules and import them one by one to find out which of them causes the slow compile process.

  2. Check the size of minified *.js file and make sure it aren't going too big in size. Large chunk of javascript source code takes time to compile.

  3. Change to another tool to compile your javascript to see if it is the compiler problem. Since you didn't mention the compile tool you are using, I would suggest to try Browserify and Webpack because they are fast and popular.

iKoala
  • 870
  • 4
  • 11
  • Thank you for your suggestion. I am surprised that I and my partner with the same code, the same compiler tools, the same computer configuration. But my gulp speed is very slow, and he's fast. – Twinna Nov 23 '16 at 08:24
  • Then you should check the versions of your imported modules (if you compile modules from public modules) and remember to compare the two minified bundle.js file from two computers. Do they have similar file size? – iKoala Nov 23 '16 at 08:57