From f6d2c3f9d57df896b56b3a1e3213e609cb12a81d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 23 May 2019 21:18:22 +0300 Subject: profile highlighting --- crates/ra_ide_api/src/syntax_highlighting.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 77c9ae3b1..7bba7a550 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs @@ -2,6 +2,7 @@ use rustc_hash::FxHashSet; use ra_syntax::{ast, AstNode, TextRange, Direction, SyntaxKind, SyntaxKind::*, SyntaxElement, T}; use ra_db::SourceDatabase; +use ra_prof::profile; use crate::{FileId, db::RootDatabase}; @@ -27,6 +28,8 @@ fn is_control_keyword(kind: SyntaxKind) -> bool { } pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec { + let _p = profile("highlight"); + let source_file = db.parse(file_id); // Visited nodes to handle highlighting priorities -- cgit v1.2.3