Skip to content

Conversation

@omer-feinberg-island
Copy link
Contributor

Small twicks for significant performance improvements:

  1. searching visited identifiers in a set rather then an array
  2. more importantly - finding refs only for unvisited identifiers

Tested on a large monorepo, got a consistent 60% time lose for large commits.

@EladBezalel
Copy link
Collaborator

This is great! I'll run tests locally and get this in
Aren't there any tests to be added?

@EladBezalel EladBezalel requested a review from Copilot April 9, 2025 07:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

libs/core/src/true-affected.ts:283

  • [nitpick] The local variable 'visited' holds a Set of identifier names which might be unclear; consider renaming it to 'visitedSet' for improved readability.
const visited = visitedIdentifiers.get(path)!;

@EladBezalel
Copy link
Collaborator

closing in favor of a new PR from a branch instead of main

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.

2 participants