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.

Performance regression in 8.0.0

See original GitHub issue

When I upgraded from 7.0.1 to 8.0.0, linting my project started taking 2.5x as long as before.

git bisect says:

6fe21e6e96f479d63055cda50d341b1142f7b8ec is the first bad commit
commit 6fe21e6e96f479d63055cda50d341b1142f7b8ec
Author: Mathias Schreck <schreck.mathias@googlemail.com>
Date:   Mon Aug 3 13:38:11 2020 +0200

    Improve data structure of custom names

 README.md                              |  24 +----
 lib/rules/no-exclusive-tests.js        |   2 +-
 lib/rules/no-skipped-tests.js          |   2 +-
 lib/util/ast.js                        |  14 +--
 lib/util/names.js                      | 164 +++++++++++++++++++++------------
 lib/util/settings.js                   |  24 +----
 test/rules/max-top-level-suites.js     |   8 +-
 test/rules/no-async-describe.js        |   2 +-
 test/rules/no-exclusive-tests.js       |  22 ++---
 test/rules/no-hooks-for-single-case.js |   8 +-
 test/rules/no-identical-title.js       |   8 +-
 test/rules/no-nested-tests.js          |   8 +-
 test/rules/no-setup-in-describe.js     |  26 ++----
 test/rules/no-sibling-hooks.js         |   8 +-
 test/rules/no-skipped-tests.js         |  23 +++--
 test/rules/no-top-level-hooks.js       |   4 +-
 test/rules/prefer-arrow-callback.js    |   1 -
 test/util/namesSpec.js                 | 151 ++++++++++++++----------------
 18 files changed, 244 insertions(+), 255 deletions(-)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
serutcommented, Mar 24, 2021

7.0.0

> TIMING=1 eslint --fix web_modules src --ext .js,.jsx

Rule                                | Time (ms) | Relative
:-----------------------------------|----------:|--------:
import/no-cycle                     | 11627.627 |    15.9%
indent                              |  6203.095 |     8.5%
import/no-self-import               |  3687.194 |     5.0%
react/no-deprecated                 |  2513.409 |     3.4%
react/state-in-constructor          |  2436.697 |     3.3%
react/no-string-refs                |  1970.265 |     2.7%
react/sort-comp                     |  1845.995 |     2.5%
react/no-direct-mutation-state      |  1833.409 |     2.5%
react/void-dom-elements-no-children |  1833.332 |     2.5%
react/no-typos                      |  1518.538 |     2.1%

real    1m52,146s
user    2m17,300s
sys     0m1,445s

8.0.0

Rule                       | Time (ms) | Relative
:--------------------------|----------:|--------:
mocha/no-nested-tests      | 14804.749 |    10.8%
import/no-cycle            | 11263.642 |     8.2%
mocha/no-identical-title   | 10832.939 |     7.9%
mocha/no-exclusive-tests   |  9639.595 |     7.0%
mocha/no-skipped-tests     |  9052.927 |     6.6%
indent                     |  5792.707 |     4.2%
mocha/no-global-tests      |  4821.304 |     3.5%
mocha/no-top-level-hooks   |  4802.673 |     3.5%
mocha/max-top-level-suites |  4783.477 |     3.5%
mocha/no-sibling-hooks     |  4762.750 |     3.5%

real    2m55,496s
user    3m22,943s
sys     0m1,952s

8.1.0

Rule                       | Time (ms) | Relative
:--------------------------|----------:|--------:
mocha/no-nested-tests      | 14666.830 |    11.7%
import/no-cycle            | 11143.362 |     8.9%
mocha/no-identical-title   | 10739.450 |     8.6%
mocha/no-skipped-tests     |  9044.689 |     7.2%
indent                     |  5525.793 |     4.4%
mocha/max-top-level-suites |  5187.068 |     4.2%
mocha/no-top-level-hooks   |  4792.140 |     3.8%
mocha/no-global-tests      |  4781.966 |     3.8%
mocha/no-sibling-hooks     |  4773.527 |     3.8%
import/no-self-import      |  3479.034 |     2.8%

real    2m43,085s
user    3m9,872s
sys     0m1,894s
1reaction
lo1tumacommented, Aug 20, 2020

Thanks for reporting this. My initial assumption is that the refactoring of astUtils is causing this, because now they are wrapped in a function an called for every rule and every linted file. I was planning to rewrite astUtils anyway to address a couple of other issues, so I hope that I can improve the performance along the way. Anyway the first step should be implementing a performance regression test, that will fail when the performance decreases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Major performance regression from 6.10.2 to 7.x and 8.0.0-test
I'm seeing a major performance regression from Node 6.x (e.g. 6.10.2) to all versions of Node 7.x and v8.0.0-test20170511830c4bf319. The ...
Read more >
TensorRT 8.4.1 Release Notes - NVIDIA Documentation Center
There is an up to 7.5% performance regression compared to TensorRT 8.0.1.6 on NVIDIA Jetson AGX Xavier™ for ResNeXt networks in FP16 mode....
Read more >
[10/11/12/13 regression] 20% slowdown of linux kernel AES ...
I ran the testcase in comment #7 and can confirm that there is a 5.24% performance regression from 6.3.1 to 7.2.1, and a...
Read more >
Changes in MySQL 8.0.28 (2022-01-18, General Availability)
The change just described represents a regression; the problem is better solved by deriving a more precise resolved data type, ...
Read more >
Prism 8.0.1 Release Notes - GraphPad
When normalizing, added a new option to define 100% of each column as the average of all values in that column · Multiple...
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