77using Rubberduck . VBEditor ;
88using System ;
99using System . Collections . Generic ;
10- using System . Diagnostics ;
1110using System . Linq ;
1211using System . Runtime . InteropServices ;
13- using Antlr4 . Runtime . Misc ;
14- using NLog ;
1512
1613namespace Rubberduck . Parsing . Symbols
1714{
@@ -40,9 +37,6 @@ public DeclarationSymbolsListener(
4037 IDictionary < Tuple < string , DeclarationType > , Attributes > attributes ,
4138 Declaration projectDeclaration )
4239 {
43- var log = LogManager . GetCurrentClassLogger ( ) ;
44- var stop = Stopwatch . StartNew ( ) ;
45-
4640 _state = state ;
4741 _qualifiedName = qualifiedName ;
4842 _annotations = annotations ;
@@ -73,10 +67,6 @@ public DeclarationSymbolsListener(
7367 {
7468 bool hasDefaultInstanceVariable = type != vbext_ComponentType . vbext_ct_ClassModule && type != vbext_ComponentType . vbext_ct_StdModule ;
7569
76- var stop1 = Stopwatch . StartNew ( ) ;
77- var stop2 = new Stopwatch ( ) ;
78- var stop3 = new Stopwatch ( ) ;
79-
8070 Declaration superType = null ;
8171 if ( type == vbext_ComponentType . vbext_ct_Document )
8272 {
@@ -92,15 +82,7 @@ public DeclarationSymbolsListener(
9282 var allNamesMatch = true ;
9383 for ( var i = 0 ; i < coclass . Key . Count ; i ++ )
9484 {
95- stop2 . Start ( ) ;
96- var propName = _qualifiedName . Component . Properties . Item ( i + 1 ) . Name ;
97- stop2 . Stop ( ) ;
98-
99- stop3 . Start ( ) ;
100- var namesMatch = coclass . Key [ i ] != propName ;
101- stop3 . Stop ( ) ;
102-
103- if ( namesMatch )
85+ if ( coclass . Key [ i ] != _qualifiedName . Component . Properties . Item ( i + 1 ) . Name )
10486 {
10587 allNamesMatch = false ;
10688 break ;
@@ -118,10 +100,6 @@ public DeclarationSymbolsListener(
118100 }
119101 }
120102 }
121- stop1 . Stop ( ) ;
122- log . Debug ( "{0}ms getting property name" , stop2 . ElapsedMilliseconds ) ;
123- log . Debug ( "{0}ms comparing property name" , stop3 . ElapsedMilliseconds ) ;
124- log . Debug ( "{0}ms resolving coclass" , stop1 . ElapsedMilliseconds ) ;
125103
126104 _moduleDeclaration = new ClassModuleDeclaration (
127105 _qualifiedName . QualifyMemberName ( _qualifiedName . Component . Name ) ,
@@ -144,9 +122,6 @@ public DeclarationSymbolsListener(
144122 {
145123 DeclareControlsAsMembers ( component ) ;
146124 }
147-
148- stop . Stop ( ) ;
149- log . Debug ( "{0}ms in declaration listener ctor" , stop . ElapsedMilliseconds ) ;
150125 }
151126
152127 private IEnumerable < IAnnotation > FindAnnotations ( )
0 commit comments