Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <llsan@microsoft.com>2019-04-09 12:41:09 +0300
committerGitHub <noreply@github.com>2019-04-09 12:41:09 +0300
commitcb4a6217abec23cf0fd26716aef97fc02d5901df (patch)
tree676054289ef7edbb2225ce90d2d644482766eeaf
parentc576bb008dfe54cdcf596237e09564ebd2da4343 (diff)
parent0f72bd503d459431a18abab240fabde438fe7e15 (diff)
Merge pull request #500 from xamarin/backport-pr-497-to-release-8.0
[release-8.0] [Core] Improve performance when looking for matching globs for new file
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs
index 8e410566aa..17e451e828 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs
@@ -1413,17 +1413,16 @@ namespace MonoDevelop.Projects.MSBuild
var pi = (ProjectInfo)projectInstance;
string filePath = MSBuildProjectService.FromMSBuildPath (pi.Project.BaseDirectory, include);
foreach (var g in pi.GlobIncludes.Where (g => g.Condition)) {
- if (IsIncludedInGlob (g.Include, pi.Project.BaseDirectory, filePath)) {
- if (g.ExcludeRegex != null) {
- if (g.ExcludeRegex.IsMatch (include))
- continue;
- }
- if (g.RemoveRegex != null) {
- if (g.RemoveRegex.IsMatch (include))
- continue;
- }
- yield return g.Item;
+ if (g.ExcludeRegex != null) {
+ if (g.ExcludeRegex.IsMatch (include))
+ continue;
}
+ if (g.RemoveRegex != null) {
+ if (g.RemoveRegex.IsMatch (include))
+ continue;
+ }
+ if (IsIncludedInGlob (g.Include, pi.Project.BaseDirectory, filePath))
+ yield return g.Item;
}
}