diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index 203867a6afe..ed20c78bf39 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -93,20 +93,39 @@ type internal FSharpWorkspaceServiceFactory match checkerSingleton with | Some _ -> () | _ -> - let checker = + let checker = lazy - let checker = + let editorOptions = + let editorOptions = workspace.Services.GetService() + + match box editorOptions with + | null -> None + | _ -> Some editorOptions + + let enableParallelCheckingWithSignatureFiles = + editorOptions + |> Option.map (fun options -> options.LanguageServicePerformance.EnableParallelCheckingWithSignatureFiles) + |> Option.defaultValue false + + let enableParallelReferenceResolution = + editorOptions + |> Option.map (fun options -> options.LanguageServicePerformance.EnableParallelReferenceResolution) + |> Option.defaultValue false + + let checker = FSharpChecker.Create( - projectCacheSize = 5000, // We do not care how big the cache is. VS will actually tell FCS to clear caches, so this is fine. + projectCacheSize = 5000, // We do not care how big the cache is. VS will actually tell FCS to clear caches, so this is fine. keepAllBackgroundResolutions = false, legacyReferenceResolver=LegacyMSBuildReferenceResolver.getResolver(), tryGetMetadataSnapshot = tryGetMetadataSnapshot, keepAllBackgroundSymbolUses = false, enableBackgroundItemKeyStoreAndSemanticClassification = true, - enablePartialTypeChecking = true) - checker - checkerSingleton <- Some checker - ) + enablePartialTypeChecking = true, + enableParallelCheckingWithSignatureFiles = enableParallelCheckingWithSignatureFiles, + parallelReferenceResolution = enableParallelReferenceResolution) + checker + checkerSingleton <- Some checker + ) let optionsManager = lazy diff --git a/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs b/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs index 689c410b5f1..a90c32bda44 100644 --- a/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs +++ b/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs @@ -63,12 +63,16 @@ type LanguageServicePerformanceOptions = { EnableInMemoryCrossProjectReferences: bool AllowStaleCompletionResults: bool TimeUntilStaleCompletion: int - ProjectCheckCacheSize: int } + ProjectCheckCacheSize: int + EnableParallelCheckingWithSignatureFiles: bool + EnableParallelReferenceResolution: bool } static member Default = { EnableInMemoryCrossProjectReferences = true AllowStaleCompletionResults = true TimeUntilStaleCompletion = 2000 // In ms, so this is 2 seconds - ProjectCheckCacheSize = 200 } + ProjectCheckCacheSize = 200 + EnableParallelCheckingWithSignatureFiles = false + EnableParallelReferenceResolution = false } [] type CodeLensOptions = diff --git a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj index b11c35d2187..1dfea7e42c8 100644 --- a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj +++ b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj @@ -24,4 +24,19 @@ + + + True + True + Strings.resx + + + + + + PublicResXFileCodeGenerator + Strings.Designer.cs + + + diff --git a/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml b/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml index e67690250dd..aacbd45f966 100644 --- a/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml +++ b/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml @@ -75,6 +75,16 @@ + + + + + + diff --git a/vsintegration/src/FSharp.UIResources/Strings.Designer.cs b/vsintegration/src/FSharp.UIResources/Strings.Designer.cs index fd74fbb404f..23696b3433b 100644 --- a/vsintegration/src/FSharp.UIResources/Strings.Designer.cs +++ b/vsintegration/src/FSharp.UIResources/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace Microsoft.VisualStudio.FSharp.UIResources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { @@ -177,6 +177,24 @@ public static string Enable_in_memory_cross_project_references { } } + /// + /// Looks up a localized string similar to Enable parallel type checking with signature files. + /// + public static string Enable_Parallel_Checking_With_Signature_Files { + get { + return ResourceManager.GetString("Enable_Parallel_Checking_With_Signature_Files", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable parallel reference resolution. + /// + public static string Enable_Parallel_Reference_Resolution { + get { + return ResourceManager.GetString("Enable_Parallel_Reference_Resolution", resourceCulture); + } + } + /// /// Looks up a localized string similar to Enable stale data for IntelliSense features. /// @@ -223,7 +241,7 @@ public static string Enter_Key_Rule { } /// - /// Looks up a localized string similar to Re-format indentation on paste. + /// Looks up a localized string similar to Re-format indentation on paste (Experimental). /// public static string Format_on_paste { get { @@ -267,6 +285,15 @@ public static string Outlining { } } + /// + /// Looks up a localized string similar to Parallelization (requires restart). + /// + public static string Parallelization { + get { + return ResourceManager.GetString("Parallelization", resourceCulture); + } + } + /// /// Looks up a localized string similar to Number of projects whose data is cached in memory. /// diff --git a/vsintegration/src/FSharp.UIResources/Strings.resx b/vsintegration/src/FSharp.UIResources/Strings.resx index b0ceb57d47a..eed808c6247 100644 --- a/vsintegration/src/FSharp.UIResources/Strings.resx +++ b/vsintegration/src/FSharp.UIResources/Strings.resx @@ -237,4 +237,13 @@ Diagnostics + + Parallelization (requires restart) + + + Enable parallel type checking with signature files + + + Enable parallel reference resolution + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf index eb4650c57ed..ea2a1e1c217 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf @@ -47,6 +47,16 @@ Diagnostika + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Výkon @@ -67,6 +77,11 @@ Navigační odkazy + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Zobrazit s_ymboly v neotevřených oborech názvů diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf index 7db4ba605f3..ea3ff5af63e 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf @@ -47,6 +47,16 @@ Diagnose + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Leistung @@ -67,6 +77,11 @@ Navigationslinks + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces S_ymbole in nicht geöffneten Namespaces anzeigen diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf index 674c69434c2..502bff48f23 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf @@ -47,6 +47,16 @@ Diagnóstico + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Rendimiento @@ -67,6 +77,11 @@ Vínculos de navegación + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Mostrar sím_bolos en espacios de nombres sin abrir diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf index ec9bafbe8df..b92f835f8a8 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf @@ -47,6 +47,16 @@ Diagnostics + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Performances @@ -67,6 +77,11 @@ Liens de navigation + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Afficher les sym_boles dans les espaces de noms non ouverts diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf index 9b2acf06d1b..477bfb6e4e7 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf @@ -47,6 +47,16 @@ Diagnostica + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Prestazioni @@ -67,6 +77,11 @@ Collegamenti di navigazione + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Mostra si_mboli in spazi dei nomi non aperti diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf index 8ab4c15b6e1..b81582ec376 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf @@ -47,6 +47,16 @@ 診断 + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance パフォーマンス @@ -67,6 +77,11 @@ ナビゲーション リンク + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces 開かれていない名前空間の記号を表示する(_Y) diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf index 4812b0acc99..fff6f72deff 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf @@ -47,6 +47,16 @@ 진단 + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance 성능 @@ -67,6 +77,11 @@ 탐색 링크 + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces 열려 있지 않은 네임스페이스에 기호 표시(_Y) diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf index c96168985ec..c9d8832b245 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf @@ -47,6 +47,16 @@ Diagnostyka + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Wydajność @@ -67,6 +77,11 @@ Linki nawigacyjne + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Pokaż s_ymbole w nieotwartych przestrzeniach nazw diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf index 076de7f9087..d30fdc11f79 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf @@ -47,6 +47,16 @@ Diagnóstico + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Desempenho @@ -67,6 +77,11 @@ Links de navegação + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Mostrar s_ímbolos em namespaces não abertos diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf index 690059925df..fb14d225f99 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf @@ -47,6 +47,16 @@ Диагностика + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Производительность @@ -67,6 +77,11 @@ Ссылки навигации + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces По_казать символы в неоткрытых пространствах имен diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf index e05c403767a..005c16db45a 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf @@ -47,6 +47,16 @@ Tanılama + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance Performans @@ -67,6 +77,11 @@ Gezinti bağlantıları + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces Açılmamış ad alanlarında s_embolleri göster diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf index b219edc12c0..542657151fb 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf @@ -47,6 +47,16 @@ 诊断 + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance 性能 @@ -67,6 +77,11 @@ 导航链接 + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces 显示未打开的命名空间中的符号(_Y) diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf index 0b6b964edda..38a5a484f58 100644 --- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf @@ -47,6 +47,16 @@ 診斷 + + Enable parallel type checking with signature files + Enable parallel type checking with signature files + + + + Enable parallel reference resolution + Enable parallel reference resolution + + Performance 效能 @@ -67,6 +77,11 @@ 導覽連結 + + Parallelization (requires restart) + Parallelization (requires restart) + + Show s_ymbols in unopened namespaces 顯示未開啟之命名空間中的符號(_Y)