Skip to content

Conversation

@ry2009
Copy link
Contributor

@ry2009 ry2009 commented Jan 18, 2026

What does this PR do?

  • Stop ripgrep scans once the file limit is reached and kill the rg process.

    • Disable symlink follow + hidden scanning by default for glob/list (only
      enable when targeted).
    • Pass limit through the debug rg path.

    Fixes Glob search uses 100% of CPU #5220

How did you verify your code works?

  • Manual: Bun script calling Ripgrep.files({ limit: 100 }) on /tmp/oc-rg-test
    (20k files + symlink loop); returns 100 quickly, no lingering rg processes.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

No duplicate PRs found that are currently open and addressing the exact same issue as PR #9220.

@ry2009
Copy link
Contributor Author

ry2009 commented Jan 18, 2026

Also cleaner then my previous perf fix #5266

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.

Glob search uses 100% of CPU

1 participant