forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDE performance improvements (dafny-lang#5415)
Includes changes from dafny-lang#5394 ### Description - `ProgramParser.ParseFiles` already was an asynchronous operation, but the parse caching mechanism did not take this into account, so it could start pruning the caching before a parsing run was completed, causing cache entries to be incorrectly pruned, leading to less caching of parsing. The resolution cache depends on GUIDs from the parsing cache to determine cache keys for modules, so this also broke resolution caching. - `PruneIfNotUsedSinceLastPruneCache` was not thread-safe, so doing two use+prune operations concurrently could serialize to a use+use+prune+prune operation, which would incorrectly prune things. - Fix a bug in `ProjectManager` that cause one compilation in a sequence of a compilations for a particular project, to have a crash. - A profiling session showed lots of time going into computing `Count` on `ConcatReadOnlyList`, so that property is now computed just once for such a list. However, this problem really requires more IDE performance tests. - Update included files message ### How has this been tested? - Added a test `ConcurrentCompilationDoesNotBreakCaching` to check that caching work swell when concurrent operations occur - Added a test `DocumentAddedToExistingProjectDoesNotCrash` that checks whether adding documents to an existing project does not cause a compilation to crash. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: Robin Salkeld <[email protected]>
- Loading branch information
1 parent
707510a
commit 57cefb6
Showing
30 changed files
with
330 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
using OmniSharp.Extensions.LanguageServer.Protocol.Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Dafny.LanguageServer.Workspace; | ||
|
||
namespace Microsoft.Dafny { | ||
public interface ISymbolResolver { | ||
void ResolveSymbols(Compilation compilation, Program program, CancellationToken cancellationToken); | ||
Task ResolveSymbols(Compilation compilation, Program program, CancellationToken cancellationToken); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.