Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize completion #5066

Merged
merged 20 commits into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
823cb99
optimize completion
Jun 1, 2018
c86ab75
cache UnresolvedSymbol
Jun 1, 2018
375abe7
more cancellable completion provider
vasily-kirichenko Jun 1, 2018
9b4c541
Merge remote-tracking branch 'origin/master' into optimize-completion
vasily-kirichenko Jun 2, 2018
15734b2
don't call isAttribute twice
vasily-kirichenko Jun 2, 2018
fc7b105
optimize IsExplicitlySuppressed, traverseMemberFunctionAndValues
vasily-kirichenko Jun 2, 2018
cab4150
cache ILTypeDef.CustomAttrs
vasily-kirichenko Jun 2, 2018
0fc55de
optimize IsExplicitlySuppressed
vasily-kirichenko Jun 2, 2018
c63e49d
avoid using Lazy to store custom attributes in ILTypeDef
vasily-kirichenko Jun 2, 2018
320f56c
CompletionProvider item's cache: replace dictionary with array
vasily-kirichenko Jun 2, 2018
1732849
provide fast generic comparer for bool values
vasily-kirichenko Jun 2, 2018
21f7fe6
make getKindPriority inline
vasily-kirichenko Jun 2, 2018
613fe0f
more defensive unresolvedSymbol
vasily-kirichenko Jun 2, 2018
205f5cf
Merge remote-tracking branch 'origin/master' into optimize-completion
vasily-kirichenko Jun 2, 2018
c4ef4ad
empty array singleton table
vasily-kirichenko Jun 2, 2018
a8051fe
faster IsOperatorName
vasily-kirichenko Jun 3, 2018
a3c6fba
optimize CompletionProvider
vasily-kirichenko Jun 3, 2018
0148fe9
Revert "empty array singleton table"
vasily-kirichenko Jun 3, 2018
7724011
Merge branch 'master' into optimize-completion
vasily-kirichenko Jun 4, 2018
fad5bdb
Merge remote-tracking branch 'origin/master' into optimize-completion
vasily-kirichenko Jun 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/fsharp/service/ServiceAssemblyContent.fs
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,19 @@ module AssemblyContentProvider =
})

let traverseMemberFunctionAndValues ns (parent: Parent) (membersFunctionsAndValues: seq<FSharpMemberOrFunctionOrValue>) =
let topRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix
let autoOpenParent = parent.AutoOpen |> Option.map parent.FixParentModuleSuffix
membersFunctionsAndValues
|> Seq.filter (fun x -> not x.IsInstanceMember && not x.IsPropertyGetterMethod && not x.IsPropertySetterMethod)
|> Seq.collect (fun func ->
let processIdents fullName idents =
let topRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix
let cleanedIdentes = parent.FixParentModuleSuffix idents
{ FullName = fullName
CleanedIdents = cleanedIdentes
Namespace = ns
NearestRequireQualifiedAccessParent = parent.ThisRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix
TopRequireQualifiedAccessParent = topRequireQualifiedAccessParent
AutoOpenParent = parent.AutoOpen |> Option.map parent.FixParentModuleSuffix
AutoOpenParent = autoOpenParent
Symbol = func
Kind = fun _ -> EntityKind.FunctionOrValue func.IsActivePattern
UnresolvedSymbol = unresolvedSymbol topRequireQualifiedAccessParent cleanedIdentes fullName }
Expand Down
3 changes: 2 additions & 1 deletion src/fsharp/symbols/SymbolHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,11 @@ module internal SymbolHelpers =
protectAssemblyExploration true (fun () ->
match item with
| Item.Types(it, [ty]) ->
isAppTy g ty &&
g.suppressed_types
|> List.exists (fun supp ->
let generalizedSupp = generalizedTyconRef supp
if isAppTy g ty && isAppTy g generalizedSupp then
if isAppTy g generalizedSupp then
cartermp marked this conversation as resolved.
Show resolved Hide resolved
// check if they are the same logical type (after removing all abbreviations)
let tcr1 = tcrefOfAppTy g ty
let tcr2 = tcrefOfAppTy g generalizedSupp
Expand Down