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

github.com/mono/mono-addins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2018-02-10 14:10:24 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2018-02-10 14:10:24 +0300
commit31e9298bf4ee506b2c41ea60c0ea19fe47bcd674 (patch)
tree93e102323482f4bc9cb0c38811f0b89f2448d2df /Mono.Addins/Mono.Addins.Database
parente1a23bdc041eeeeea35100de192932410b6b09f1 (diff)
[FileDatabase] Optimize addin scanning
The format of the addin cache data is something like below: Users_therzok_Work_md_monodevelop_main_build_AddIns_MonoDevelop.AzureFunctions_azure-functions-cli-66a932fb_nb_abf27ece.data That means that the code which is removed was looking for something that would match: <Full_Path>_sha*.data Only 1 item matches that, and if the direct query did not exist, it means scanning the whole folder for another file which matches the pattern is useless. Reduces AddinDatabase.Update for full VSMac from 1.95s to 0.72s, that's 1.23 spent just doing IO via Directory.GetFiles.
Diffstat (limited to 'Mono.Addins/Mono.Addins.Database')
-rw-r--r--Mono.Addins/Mono.Addins.Database/FileDatabase.cs9
1 files changed, 0 insertions, 9 deletions
diff --git a/Mono.Addins/Mono.Addins.Database/FileDatabase.cs b/Mono.Addins/Mono.Addins.Database/FileDatabase.cs
index 3fc88a6..bdf9bad 100644
--- a/Mono.Addins/Mono.Addins.Database/FileDatabase.cs
+++ b/Mono.Addins/Mono.Addins.Database/FileDatabase.cs
@@ -368,15 +368,6 @@ namespace Mono.Addins.Database
fileName = file;
return result;
}
-
- // The file is not the one we expected. There has been a name collision
-
- foreach (string f in GetDirectoryFiles (directory, name + "*" + extension)) {
- if (f != file && OpenFileForPath (f, objectId, typeMap, checkOnly, out result)) {
- fileName = f;
- return result;
- }
- }
// File not found
fileName = null;