question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

high ram/memory usage

See original GitHub issue

Tell us about your environment Environment Info:

Node version: v12.11.1 npm version: v6.12.0 Local ESLint version: v6.5.1 Global ESLint version: v6.5.1 (Currently used)

eslint 'src/**/*.ts'

Are you willing to submit a pull request to fix this bug? depends on the scope

  • Issue Type: Bug
  • OS Version: Linux x64 5.3.6-1-MANJARO
  • @typescript-eslint/eslint-plugin”: “2.4.0”,
  • @typescript-eslint/parser”: “2.4.0”,
  • “eslint”: “6.5.1”,
  • “eslint-config-prettier”: “6.4.0”,
  • “eslint-plugin-prettier”: “3.1.1”,
  • “eslint-plugin-promise”: “4.2.1”,

The Ram usage of eslint is very high (~2,4GiB). Is this normal for this many rules and plugins? Is this a eslint or a typescript-eslint problem?

ram

eslintrc.json
{
    "extends": [
        "eslint:recommended",
        "plugin:@typescript-eslint/eslint-recommended",
        "plugin:@typescript-eslint/recommended",
        "plugin:@typescript-eslint/recommended-requiring-type-checking",
        "prettier",
        "prettier/@typescript-eslint",
        "plugin:prettier/recommended",
        "plugin:promise/recommended"
    ],
    "parser": "@typescript-eslint/parser",
    "plugins": ["@typescript-eslint", "prettier", "promise"],
    "env": {
        "node": true
    },
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "project": "./tsconfig.json",
        "ecmaFeatures": {
            "modules": true
        }
    },
    "reportUnusedDisableDirectives": true,
    "rules": {
        "prettier/prettier": "warn",
        "semi": ["warn", "always"],
        "prefer-const": "warn",
        "max-lines": [
            "error",
            {
                "max": 300,
                "skipComments": false,
                "skipBlankLines": false
            }
        ],
        "arrow-body-style": "error",
        "curly": "warn",
        "dot-notation": "error",
        "eol-last": "error",
        "no-caller": "error",
        "no-debugger": "error",
        "no-new-wrappers": "error",
        "no-throw-literal": "error",
        "no-undef-init": "error",
        "no-var": "error",
        "radix": "error",
        "no-alert": "error",
        "no-console": ["error", { "allow": ["warn", "error", "log"] }],
        "no-proto": "error",
        "no-new-func": "error",
        "lines-between-class-members": [
            "warn",
            "always",
            {
                "exceptAfterSingleLine": true
            }
        ],
        "spaced-comment": "warn",
        "guard-for-in": "warn",
        "prefer-spread": "off",
        "no-restricted-imports": ["error", "rxjs/Rx"],
        "quotes": ["warn", "single"],
        "quote-props": ["warn", "as-needed"],
        "max-lines-per-function": ["warn", { "max": 75, "skipComments": true }],
        "@typescript-eslint/no-namespace": "off",
        "@typescript-eslint/camelcase": "warn",
        "@typescript-eslint/type-annotation-spacing": "warn",
        "@typescript-eslint/no-inferrable-types": [
            "warn",
            {
                "ignoreParameters": true,
                "ignoreProperties": false
            }
        ],
        "@typescript-eslint/no-explicit-any": "warn",
        "@typescript-eslint/consistent-type-assertions": "warn",
        "@typescript-eslint/no-empty-interface": "error",
        "@typescript-eslint/no-misused-new": "error",
        "@typescript-eslint/no-non-null-assertion": "error",
        "@typescript-eslint/member-ordering": "warn",
        "@typescript-eslint/unified-signatures": "warn",
        "@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
        "@typescript-eslint/class-name-casing": "warn",
        "@typescript-eslint/no-use-before-define": "off",
        "@typescript-eslint/unbound-method": [
            "error",
            {
                "ignoreStatic": true
            }
        ],
        "@typescript-eslint/explicit-member-accessibility": ["warn", { "accessibility": "no-public" }],
        "@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }]
    }
}

cc https://github.com/microsoft/vscode-eslint/issues/782

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 24, 2019

typescript-eslint released version 2.5.0 which drops the ram usage to about ~1GiB 🎉 and also fixes the bug described above, where eslint wouldn’t terminate (https://github.com/typescript-eslint/typescript-eslint/issues/1079) 🎉 🎉

Thank you eslint team for the help. A lower ram consumption is always welcome, but for now I am happy again 😃

0reactions
kaicataldocommented, Oct 24, 2019

There are a lot of moving parts here and it’s going to be difficult for to figure this out without having a minimal reproduction case. Any chance you can find the minimal reproduction steps needed to cause this (using ESLint directly, not an editor integration)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix High RAM Memory Usage Issue on Windows 11/10 [10 ...
10 Fixes for High (RAM) Memory Usage Issue on Windows 11/10 · 1. Close Unnecessary Running Programs/Applications · 2. Disable Startup Programs ·...
Read more >
Windows 10 High Memory Usage [Causes and Solutions]
How to Fix Windows 10 High Memory Usage · Close unnecessary programs. · Disable startup programs. · Disable Superfetch service. · Increase virtual ......
Read more >
High memory usage. How to fix them - Microsoft Community
1) See fixes for high RAM usage: · 2) Optimize Virtual Memory: · 3) Type Resource in Search box, open Resource Monitor as...
Read more >
How to Fix High Memory Usage in Windows - Make Tech Easier
How to Fix High Memory Usage in Windows · 1. Close Unnecessary Programs and Applications · 2. Remove Unwanted Programs from Your PC...
Read more >
Why is my RAM usage so high when nothing is running?
Possible reasons for high RAM usage · PC has too many programs that start during the startup · Potential Virus attack · Registry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found