-
Notifications
You must be signed in to change notification settings - Fork 789
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
Improve perf on CollectResults #2018
Conversation
3c92ac7
to
7f86562
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any measurements about how much time is spent here?
Intuitively it seems like a good spot for optimization, but it would be nice to be able to confirmit.
@@ -2193,7 +2199,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) fullyQualified m ad n | |||
if List.isEmpty tcrefs then NoResultsOrUsefulErrors else | |||
let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) | |||
let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) | |||
ResolveLongIdentInTyconRefs ncenv nenv LookupKind.Expr 1 m ad rest typeNameResInfo id.idRange tcrefs | |||
ResolveLongIdentInTyconRefs true ncenv nenv LookupKind.Expr 1 m ad rest typeNameResInfo id.idRange tcrefs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use an enum for at most 1, true is a tad tricky to read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes would have done this anyways. But you are definitely right
(ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo ad genOk) | ||
|?> List.concat | ||
|
||
let modulSearchFailed() = | ||
ResolveLongIndentAsModuleOrNamespaceThen ncenv.amap m fullyQualified nenv AccessibleFromSomeFSharpCode lid | ||
ResolveLongIndentAsModuleOrNamespaceThen false ncenv.amap m fullyQualified nenv AccessibleFromSomeFSharpCode lid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto enum for false.
@dotnet-bot test this. failures are not related. |
I'm trying to measure this and it's not making huge impact as is on a full compile. But from what I can in VS debug it's definitely doing a lot less work for name resolution. This is especially important for suggestion errors. |
90f4fc8
to
293b69b
Compare
made it an emu |
Wow didn't expect this to be merged so fast. @dsyme could you please take a
look as well?
Am 15.12.2016 9:43 nachm. schrieb "Kevin Ransom (msft)" <
notifications@github.com>:
Merged #2018 <#2018>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2018 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADgNCJH4q4x5S5DOma1WgtzdcEhy_19ks5rIaaMgaJpZM4LOFN_>
.
|
There are situations where we can cut the name resolution