File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 33using System . Linq ;
44using System . Runtime . InteropServices ;
55using NLog ;
6+ using Rubberduck . Parsing . Common ;
67using Rubberduck . Parsing . UIContext ;
78using Rubberduck . Parsing . VBA . Extensions ;
89using Rubberduck . VBEditor . ComManagement ;
@@ -44,6 +45,8 @@ public ComProject UserProject(string projectId)
4445
4546 public void RefreshUserComProjects ( IReadOnlyCollection < string > projectIdsToReload )
4647 {
48+ var parsingStageTimer = ParsingStageTimer . StartNew ( ) ;
49+
4750 RemoveNoLongerExistingProjects ( ) ;
4851 RemoveProjects ( projectIdsToReload ) ;
4952 var loadTask = _uiDispatcher . StartTask ( ( ) =>
@@ -52,6 +55,9 @@ public void RefreshUserComProjects(IReadOnlyCollection<string> projectIdsToReloa
5255 AddLockedProjects ( ) ;
5356 } ) ;
5457 loadTask . Wait ( ) ;
58+
59+ parsingStageTimer . Stop ( ) ;
60+ parsingStageTimer . Log ( "Loaded ComProjects for user projects in {0}ms." ) ;
5561 }
5662
5763 private void RemoveNoLongerExistingProjects ( )
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using System . Linq ;
3+ using Rubberduck . Parsing . Common ;
34using Rubberduck . Parsing . ComReflection ;
45
56namespace Rubberduck . Parsing . VBA . DeclarationResolving
@@ -35,6 +36,8 @@ public UserComProjectSynchronizer(
3536
3637 public void SyncUserComProjects ( )
3738 {
39+ var parsingStateTimer = ParsingStageTimer . StartNew ( ) ;
40+
3841 _lastSyncLoadedDeclaration = false ;
3942 _unloadedProjectIds . Clear ( ) ;
4043
@@ -46,6 +49,9 @@ public void SyncUserComProjects()
4649
4750 LoadProjects ( newProjectIdsToBeLoaded ) ;
4851 UnloadProjects ( projectsToBeUndloaded ) ;
52+
53+ parsingStateTimer . Stop ( ) ;
54+ parsingStateTimer . Log ( "Loaded declarations from ComProjects for user projects in {0}ms." ) ;
4955 }
5056
5157 private void LoadProjects ( IEnumerable < string > projectIds )
You can’t perform that action at this time.
0 commit comments