Merge pull request #3474 from Microsoft/classificationPerf

Use full spans in the classifier.  Non-full spans are very expensive to compute.
This commit is contained in:
CyrusNajmabadi 2015-06-10 17:45:37 -07:00
commit 29fcd4aa90

View file

@ -6046,8 +6046,8 @@ module ts {
function processNode(node: Node) {
// Only walk into nodes that intersect the requested span.
if (node && textSpanIntersectsWith(span, node.getStart(), node.getWidth())) {
if (node.kind === SyntaxKind.Identifier && node.getWidth() > 0) {
if (node && textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) {
if (node.kind === SyntaxKind.Identifier && !nodeIsMissing(node)) {
let symbol = typeChecker.getSymbolAtLocation(node);
if (symbol) {
let type = classifySymbol(symbol, getMeaningFromLocation(node));