perf(inlayhints): убрать квадратичный обход AST в SourceDefinedMethodCallInlayHintSupplier#4107
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughIntroduces ChangesDoCallRangeIndex and InlayHint Supplier Refactor
Sequence Diagram(s)sequenceDiagram
participant Client
participant Supplier as SourceDefinedMethodCallInlayHintSupplier
participant Index as DoCallRangeIndex
participant Doc as DocumentContext
Client->>Supplier: getInlayHints(documentContext, range)
Supplier->>Index: of(documentContext)
Index->>Doc: traverse all doCall nodes
Doc-->>Index: doCall list with name ranges
Index-->>Supplier: DoCallRangeIndex
loop each method reference in range
Supplier->>Index: doCallFor(reference)
Index-->>Supplier: Optional DoCallContext
Supplier->>Supplier: toInlayHints(reference, doCall)
end
Supplier-->>Client: List of InlayHint
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Что
Устранён квадратичный обход AST в
SourceDefinedMethodCallInlayHintSupplier.Как
Trees.findAllRuleNodesпо всему AST.DoCallRangeIndex, ключом служитRangeвызова / имени типа, совпадающий сReference#selectionRange().Поведение не изменилось; добавлен новый класс
DoCallRangeIndex.Выделено из #4077 (часть 2 из 2).
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Refactoring
Tests