Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[no-implied-eval] Potential earlier exit for increased performance on large projects #4286

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginperformanceIssues regarding performance
@mikeauclair

Description

@mikeauclair

When running eslint,@typescript-eslint/no-implied-eval is (unexpectedly) the plurality of our runtime. In lifting the early exit up to the beginning of the function herehttps://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/no-implied-eval.ts#L138-L144 in the version installed in ournode_modules dir performance is increased greatly (results in actual / expected below). I'm willing to PR this change if this sounds like a plausible issue, but I don't have a great understanding of what root cause could be here as of yet, just that an earlier exit seems to help.

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I haveread the FAQ and my problem is not listed.

Repro
This issue doesn't seem to surface in the minimal case (smaller slices of our application don't have no-implied-eval trump prettier in runtime), so it's near-impossible to provide a minimal repro case. This could be due to cache growth somewhere?

{"rules": {"@typescript-eslint/no-implied-eval": ["error"],  }}

Expected Result
A timing blend along the lines of:

Rule                                 | Time (ms) | Relative:------------------------------------|----------:|--------:prettier/prettier                    | 37671.679 |    41.0%import/no-duplicates                 | 18799.573 |    20.5%@typescript-eslint/no-implied-eval   |  7390.961 |     8.0%react/no-string-refs                 |  6424.481 |     7.0%import/order                         |  4490.649 |     4.9%compat/compat                        |  4415.710 |     4.8%jsdoc/check-alignment                |  2617.101 |     2.8%jsdoc/check-indentation              |  1500.595 |     1.6%jsdoc/newline-after-description      |  1500.423 |     1.6%@typescript-eslint/naming-convention |  1214.155 |     1.3%

Actual Result

Rule                                 | Time (ms) | Relative:------------------------------------|----------:|--------:@typescript-eslint/no-implied-eval   | 65356.175 |    35.6%prettier/prettier                    | 51318.756 |    28.0%import/no-duplicates                 | 27946.578 |    15.2%react/no-string-refs                 |  8523.883 |     4.6%compat/compat                        |  6618.511 |     3.6%import/order                         |  5727.805 |     3.1%jsdoc/check-alignment                |  3421.487 |     1.9%jsdoc/newline-after-description      |  2177.228 |     1.2%jsdoc/check-indentation              |  2131.201 |     1.2%@typescript-eslint/naming-convention |  1679.087 |     0.9%

Additional Info

Versions

packageversion
@typescript-eslint/eslint-plugin5.6.0
@typescript-eslint/parser5.6.0
TypeScript4.5.0
ESLint8.4.1
node16.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginperformanceIssues regarding performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp