fork-ts-checker-webpack-plugin icon indicating copy to clipboard operation
fork-ts-checker-webpack-plugin copied to clipboard

Building become slower when upgrade to 7.x

Open jonathan-chancetop opened this issue 2 years ago • 4 comments

Hello guys, I'm curious that when I upgraded to 7.2.13, my building time increased from 4s to 6.6s, below is my configuration: This is the configuration for 6.0.3

        new ForkTSCheckerPlugin({
            typescript: {
                configFile: env.tsConfig,
                mode: "write-references",
            },
            eslint: {
                files: `${env.src}/**/*.{ts,tsx}`,
                memoryLimit: 512,
            },
        }),

This is the configuration for 7.2.13:

        new ForkTSCheckerPlugin({
            typescript: {
                configFile: env.tsConfig,
                mode: "write-references",
            },
        }),

I enabled cache in webpack and ts check, I also dropped the result for the first build, so these results are all used cache.

I haven't added another eslint plugin, so I don't know why it is slower then before, especially that it now only run ts checking but both run ts checking and esling checking before.

jonathan-chancetop avatar Jul 26 '22 08:07 jonathan-chancetop

Happening to me as well on version. Dev/watch take 10-30 seconds for a small change.

Using

  • plugin verison: 7.2.13
  • nodejs 16.17
  • webpack 5.74.0
  • ts-loader 9.3.1
  • typescript 4.8.2

Downgrading to 6.5.1 fixed issue witrh watch time take around 1 second

talha5389 avatar Aug 30 '22 20:08 talha5389

Hi, @talha5389 @jonathan-chancetop Could you please check if 7.2.11 version is ok.

In my case any next re-build doubles types check time. I've found out that it breaks with version 7.2.12.

Using:

  • plugin verison: 7.2.13
  • nodejs 16.17
  • webpack 5.74.0
  • ts-loader 9.3.1
  • typescript 4.8.2

Plugin has default settings. Also instead of webpack-dev-server I'm using webpack-dev-middleware with custom express server.

Krakof avatar Sep 28 '22 05:09 Krakof

If 7.2.12 change affected build speed, consider re-adding node_modules to webpack's watchOptions.ignored config: https://webpack.js.org/configuration/watch/#watchoptionsignored

piotr-oles avatar Sep 28 '22 11:09 piotr-oles

@piotr-oles I can confirm that 7.2.12 seem to have performance issue fixed if I add node_modules to watchOptions.ignored

above workaround also works for 7.2.13. I have verified that.

talha5389 avatar Sep 29 '22 22:09 talha5389

:tada: This issue has been resolved in version 7.2.14 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Dec 16 '22 00:12 github-actions[bot]