From ec6fb8da7c7a5529e1db30c0a6f7e2cda6a75d19 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 6 Feb 2020 14:55:10 +0100 Subject: Add profiling around add_impl_members This intention is pretty slow for `impl Interator`, because it has a ton of default methods which need to be substituted. The proper fix here is to not compute the actual edit until the user triggers the action, but that's awkward to do in the LSP right now, so let's just put a profiling code for now. --- crates/ra_assists/src/assists/add_missing_impl_members.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_assists/src/assists') diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index 5bb937bde..e4c22ad55 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs @@ -99,6 +99,7 @@ fn add_missing_impl_members_inner( assist_id: &'static str, label: &'static str, ) -> Option { + let _p = ra_prof::profile("add_missing_impl_members_inner"); let impl_node = ctx.find_node_at_offset::()?; let impl_item_list = impl_node.item_list()?; -- cgit v1.2.3