Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: improve rule no-cycle using strongly connected components #111

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

SukkaW
Copy link
Collaborator

@SukkaW SukkaW commented Jul 11, 2024

Ports import-js#2998 to eslint-plugin-import-x.

This should drastically improve no-cycle performance.


For each dependency graph (aka ExportMap) we can run Tarjan's SCC once (which is a derivative of DFS = O(n))

That saves us a lot of work because we run a linear-complexity algorithm once, as opposed to for each linted file (which turned us O(n^2))

Copy link

changeset-bot bot commented Jul 11, 2024

🦋 Changeset detected

Latest commit: f21b243

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-import-x Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codesandbox-ci bot commented Jul 11, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@SukkaW SukkaW merged commit 5cce946 into un-ts:master Jul 11, 2024
15 checks passed
SukkaW added a commit that referenced this pull request Jul 23, 2024
@SukkaW SukkaW mentioned this pull request Jul 23, 2024
SukkaW added a commit that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant