Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions changelog.d/unreleased/2811.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
category: fixed
issues:
- 2811
affected:
- src/CodeIndex/Database/DbSymbolReader.cs
- src/CodeIndex/Database/DbContext.cs
- tests/CodeIndex.Tests/DbReaderTests.cs
---

## English

- **`unused` now avoids long silent scans for non-SQL scopes (#2811)** — `unused --path ... --exclude-tests --json --limit ...` now uses a bounded non-SQL fast path instead of repeatedly running expensive correlated reference scans, so small limits return promptly on large C# scopes.

## 日本語

- **非 SQL スコープで `unused` が長時間無音で走り続けないようになりました (#2811)** — `unused --path ... --exclude-tests --json --limit ...` は高コストな相関参照スキャンを繰り返さず、非 SQL 用の bounded fast path を使うようになったため、大きな C# スコープでも小さな limit がすばやく返ります。
2 changes: 1 addition & 1 deletion src/CodeIndex/Database/DbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ internal static void RegisterConnectionFunctions(SqliteConnection connection)
SqlNameResolver.AllowLeafFallbackAtColumn(symbolName, context, containerName, ToNullableInt(columnNumber)) ? 1 : 0);
}

private static int CountCSharpIdentifierOccurrences(string? text, string? identifier)
internal static int CountCSharpIdentifierOccurrences(string? text, string? identifier)
{
if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(identifier))
return 0;
Expand Down
Loading
Loading