Skip to content

Commit a816079

Browse files
committed
Add perf comment
1 parent c9f6bc6 commit a816079

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/refactors/extractMethod.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,9 @@ namespace ts.refactor.extractMethod {
10421042
}
10431043

10441044
function recordTypeParameterUsages(type: Type) {
1045+
// PERF: This is potentially very expensive. `type` could be a library type with
1046+
// a lot of properties, each of which the walker will visit. Unfortunately, the
1047+
// solution isn't as trivial as filtering to user types because of (e.g.) Array.
10451048
const symbolWalker = checker.getSymbolWalker();
10461049
const {visitedTypes} = symbolWalker.walkType(type);
10471050

0 commit comments

Comments
 (0)