simonhaenisch/prettier-plugin-organize-imports

Cache performance issue

dgruszcz opened this issue · 1 comments

module.exports.getCompilerOptions = memoize(getCompilerOptions);

memoize for getCompilerOptions uses path of the formatted file as a cache key instead of the tsconfig file path (as in v3.1.1). It causes that the tsconfig file content is parsed for each formatted file regardless if they are related to same tsconfig file or not. This adds unneccessary constant delay and for a large number of files it quickly adds up.

Cool thanks for reporting yeah will need to get that fixed.