Code Monkey home page Code Monkey logo

Comments (9)

eseliger avatar eseliger commented on September 17, 2024 2

Looking good:

only 9.7% && 6.7%!

Rule                                    | Time (ms) | Relative
:---------------------------------------|----------:|--------:
@typescript-eslint/no-misused-promises  |  3327.775 |    26.8%
@typescript-eslint/no-floating-promises |  1862.377 |    15.0%
etc/deprecation                         |  1202.930 |     9.7%
react/prefer-stateless-function         |   694.252 |     5.6%
import/extensions                       |   613.231 |     4.9%
@typescript-eslint/unbound-method       |   489.783 |     4.0%
react/no-deprecated                     |   374.281 |     3.0%
react/void-dom-elements-no-children     |   270.650 |     2.2%
react/jsx-no-bind                       |   231.381 |     1.9%
import/no-self-import                   |   193.985 |     1.6%

Rule                                    | Time (ms) | Relative
:---------------------------------------|----------:|--------:
@typescript-eslint/no-misused-promises  |  7968.406 |    28.2%
@typescript-eslint/unbound-method       |  2493.286 |     8.8%
@typescript-eslint/no-floating-promises |  2093.141 |     7.4%
import/extensions                       |  2050.360 |     7.3%
etc/deprecation                         |  1888.401 |     6.7%
react/prefer-stateless-function         |  1402.873 |     5.0%
react/no-deprecated                     |   919.743 |     3.3%
react/jsx-no-bind                       |   780.526 |     2.8%
react/void-dom-elements-no-children     |   663.284 |     2.3%
react/no-string-refs                    |   526.400 |     1.9%

from eslint-plugin-etc.

cartant avatar cartant commented on September 17, 2024 2

Nice. Now that some other rule is at the top of the list, I'm going to deem this no-longer-a-bug. There are some other things I might play with, at some later stage, so I'll leave this open, but labelled as an enhancement.

from eslint-plugin-etc.

cartant avatar cartant commented on September 17, 2024 1

Yeah, I can think of a few ways to make it more performant. Thanks for raising this.

from eslint-plugin-etc.

cartant avatar cartant commented on September 17, 2024

This should be a little quicker in 0.0.1-beta.19 - which has just been published.

from eslint-plugin-etc.

eseliger avatar eseliger commented on September 17, 2024

Confirmed!

From 31.7% && 38.0% down to 23.4% && 26.7%

Rule                                    | Time (ms) | Relative
:---------------------------------------|----------:|--------:
etc/deprecation                         |  2339.867 |    23.4%
@typescript-eslint/no-misused-promises  |  1112.053 |    11.1%
@typescript-eslint/no-floating-promises |  1095.841 |    11.0%
react/prefer-stateless-function         |   655.819 |     6.6%
import/extensions                       |   594.468 |     5.9%
react/no-deprecated                     |   371.769 |     3.7%
react/void-dom-elements-no-children     |   319.616 |     3.2%
react/jsx-no-bind                       |   239.463 |     2.4%
import/no-self-import                   |   222.715 |     2.2%
react/no-typos                          |   188.193 |     1.9%

Rule                                    | Time (ms) | Relative
:---------------------------------------|----------:|--------:
etc/deprecation                         |  5012.399 |    26.7%
@typescript-eslint/no-misused-promises  |  1573.824 |     8.4%
import/extensions                       |  1542.515 |     8.2%
react/prefer-stateless-function         |  1205.946 |     6.4%
@typescript-eslint/no-floating-promises |  1114.325 |     5.9%
react/no-deprecated                     |   739.743 |     3.9%
react/jsx-no-bind                       |   664.616 |     3.5%
react/void-dom-elements-no-children     |   558.648 |     3.0%
react/no-string-refs                    |   402.614 |     2.1%
react/no-typos                          |   393.122 |     2.1%

from eslint-plugin-etc.

cartant avatar cartant commented on September 17, 2024

Hmm. Still pretty shitty. Hopefully, this can be made faster still using ESLint's variables thingy, but that's a little more complicated. I'll have a look a little later.

from eslint-plugin-etc.

cartant avatar cartant commented on September 17, 2024

I've had some time to play around with this a bit. Try 0.0.1-beta.20. It should be quicker.

from eslint-plugin-etc.

eseliger avatar eseliger commented on September 17, 2024

yes, agree!

from eslint-plugin-etc.

Samuel-Therrien-Beslogic avatar Samuel-Therrien-Beslogic commented on September 17, 2024

FWIW, etc/no-deprecated and etc/no-internal are currently at the top slowest rules in a project where ESLint is noticeably slow. Not sure if related or if I should open a new issue for performance.

Rule                                      | Time (ms) | Relative
:-----------------------------------------|----------:|--------:
etc/no-deprecated                         |  2515.552 |    20.5%
import/no-duplicates                      |  1993.658 |    16.3%
etc/no-internal                           |  1440.442 |    11.7%
import/export                             |  1396.381 |    11.4%
total-functions/no-unsafe-enum-assignment |   554.410 |     4.5%
@typescript-eslint/no-floating-promises   |   395.713 |     3.2%
@typescript-eslint/no-unsafe-assignment   |   215.030 |     1.8%
@typescript-eslint/no-redeclare           |   195.273 |     1.6%
camelcase                                 |   188.976 |     1.5%
unicorn/prevent-abbreviations             |   175.437 |     1.4%

(on certain uncached runs, etc/no-deprecated can get up to 10s)

And this was on a recent --fix run that affected lots of files:

Rule                                      |  Time (ms) | Relative
:-----------------------------------------|-----------:|--------:
etc/no-deprecated                         | 646137.513 |    60.8%
etc/no-internal                           | 390563.923 |    36.8%
@nrwl/nx/enforce-module-boundaries        |   6730.989 |     0.6%
import/no-duplicates                      |   5080.625 |     0.5%
@typescript-eslint/no-floating-promises   |   1931.164 |     0.2%
import/export                             |   1879.495 |     0.2%
total-functions/no-unsafe-enum-assignment |   1532.563 |     0.1%
@typescript-eslint/no-unsafe-assignment   |    596.325 |     0.1%
@typescript-eslint/no-redeclare           |    412.016 |     0.0%
rxjs/no-exposed-subjects                  |    402.550 |     0.0%

from eslint-plugin-etc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.