Skip to content

Commit 29fcd4a

Browse files
Merge pull request microsoft#3474 from Microsoft/classificationPerf
Use full spans in the classifier. Non-full spans are very expensive to compute.
2 parents f73af3a + 3a96923 commit 29fcd4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/services.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6046,8 +6046,8 @@ module ts {
60466046

60476047
function processNode(node: Node) {
60486048
// Only walk into nodes that intersect the requested span.
6049-
if (node && textSpanIntersectsWith(span, node.getStart(), node.getWidth())) {
6050-
if (node.kind === SyntaxKind.Identifier && node.getWidth() > 0) {
6049+
if (node && textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) {
6050+
if (node.kind === SyntaxKind.Identifier && !nodeIsMissing(node)) {
60516051
let symbol = typeChecker.getSymbolAtLocation(node);
60526052
if (symbol) {
60536053
let type = classifySymbol(symbol, getMeaningFromLocation(node));

0 commit comments

Comments
 (0)