7
7
using Rubberduck . VBEditor ;
8
8
using System ;
9
9
using System . Collections . Generic ;
10
- using System . Diagnostics ;
11
10
using System . Linq ;
12
11
using System . Runtime . InteropServices ;
13
- using Antlr4 . Runtime . Misc ;
14
- using NLog ;
15
12
16
13
namespace Rubberduck . Parsing . Symbols
17
14
{
@@ -40,9 +37,6 @@ public DeclarationSymbolsListener(
40
37
IDictionary < Tuple < string , DeclarationType > , Attributes > attributes ,
41
38
Declaration projectDeclaration )
42
39
{
43
- var log = LogManager . GetCurrentClassLogger ( ) ;
44
- var stop = Stopwatch . StartNew ( ) ;
45
-
46
40
_state = state ;
47
41
_qualifiedName = qualifiedName ;
48
42
_annotations = annotations ;
@@ -73,10 +67,6 @@ public DeclarationSymbolsListener(
73
67
{
74
68
bool hasDefaultInstanceVariable = type != vbext_ComponentType . vbext_ct_ClassModule && type != vbext_ComponentType . vbext_ct_StdModule ;
75
69
76
- var stop1 = Stopwatch . StartNew ( ) ;
77
- var stop2 = new Stopwatch ( ) ;
78
- var stop3 = new Stopwatch ( ) ;
79
-
80
70
Declaration superType = null ;
81
71
if ( type == vbext_ComponentType . vbext_ct_Document )
82
72
{
@@ -92,15 +82,7 @@ public DeclarationSymbolsListener(
92
82
var allNamesMatch = true ;
93
83
for ( var i = 0 ; i < coclass . Key . Count ; i ++ )
94
84
{
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 )
104
86
{
105
87
allNamesMatch = false ;
106
88
break ;
@@ -118,10 +100,6 @@ public DeclarationSymbolsListener(
118
100
}
119
101
}
120
102
}
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 ) ;
125
103
126
104
_moduleDeclaration = new ClassModuleDeclaration (
127
105
_qualifiedName . QualifyMemberName ( _qualifiedName . Component . Name ) ,
@@ -144,9 +122,6 @@ public DeclarationSymbolsListener(
144
122
{
145
123
DeclareControlsAsMembers ( component ) ;
146
124
}
147
-
148
- stop . Stop ( ) ;
149
- log . Debug ( "{0}ms in declaration listener ctor" , stop . ElapsedMilliseconds ) ;
150
125
}
151
126
152
127
private IEnumerable < IAnnotation > FindAnnotations ( )
0 commit comments