Skip to content

perf: (issue #377) add caching and use re2 for alias scanning in files #491

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

khoaHyh
Copy link

@khoaHyh khoaHyh commented Apr 12, 2025

Attempting to continue the work done in #408. Closes #377.

Changes

  • use caching to optimize file globbing and regex compilation
  • swap stdlib regexp out for go-re2 for improved regex compilation and pattern matching
  • added a test to assert alias-finding logic works properly when given a set of files with flag references in them

Benchmarks

I compiled and executed locally using local-find-code-refs --debug --dryRun -t=$SOME_TOKEN -d=. -p=default -r=some-repo --ignoreServiceErrors

Ran this on a repo where the command execution never completed (waited >30 minutes until I cancelled) and when using this branch's version, the command was able to complete within 8m14s.

@khoaHyh khoaHyh marked this pull request as ready for review April 12, 2025 22:31
@khoaHyh khoaHyh requested a review from a team as a code owner April 12, 2025 22:31
@khoaHyh khoaHyh changed the title perf: (issue #377) add caching and use re2 perf: (issue #377) add caching and use re2 for alias scanning in files Apr 13, 2025
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.

Tool gets stuck when defining glob filepattern on big repo
1 participant