gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

Perform cache reading in parent process to create fewer processes #10

Closed swac closed 7 years ago

swac commented 7 years ago

This moves the cache reading logic into the parent process in an effort to fork fewer child processes when the cache hit rate is very high. Forking several dozen processes appears to have a noticeable overhead, so only forking processes when necessary can help to alleviate this. We do this by copying cached data into the compilation output in the parent process, and then only sending files to worker processes if the files do not already appear in the cache. Doing this work in the parent process appears to take a relatively insignificant amount of time.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-7.2%) to 71.304% when pulling c4d2c9b2ed00f377aebd0bd80ea4fdd3de83d6a3 on swac:ab/fewerworkers into 143d7f899a8de75e16b8fc2e719b5f123b21d1b3 on gdborton:master.

gdborton commented 7 years ago

Change LTGM