betterer icon indicating copy to clipboard operation
betterer copied to clipboard

Fails with insufficient memory on large projects

Open adso023 opened this issue 3 years ago • 2 comments

Describe the bug

  • On large projects betterer fails out with a NodeJS heap out of memory exception.
  • I realize we can increase the node heap size but we're essentially maxing out a Github actions runner so we don't have much room left to run this in CI.

To Reproduce Repo: https://github.com/adso023/Dummy-Repository Command: yarn run betterer

// .betterer.ts
import { eslint } from '@betterer/eslint';
const eslintConfig = require('./.eslintrc.js');

export default {
  'ts lint': eslint(eslintConfig.overrides[0].rules).include(['src/**/*.ts']),
};

Expected behavior betterer should run correctly and it shouldn't error out due to insufficient memory

Screenshots image

Versions (please complete the following information):

  • OS: Windows 10 1809
  • Betterer: 4.4.1
  • Node: v14.17.0

Additional context It seems like this might be a similar issue to #1050, though we're running into memory issues rather than raw file count. It seems like from the comments in that ticket that betterer keeps each file open, is there any reason for this because it seems like closing files once parsed should solve both these issues.

adso023 avatar Nov 21 '22 16:11 adso023

Bump, also have this issue on my end

alexseguin avatar Jan 26 '23 16:01 alexseguin