You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intellisense works in at most 1 second (red line appearing above). I'm not sure exactly what upper bound would be reasonable, but if it takes more than a second or two, it is hard to make use of it.
Actual behavior
Intellisense takes about 7 seconds.
Related information
I did a profile of the same problem in Ionide (PerfView could not seem to handle profiling VS 2017), and got these results, showing some hot spots in the code:
Using Windows 10, Visual Studio 2017, latest F# Nightly tools as of 5/7/2017
Example library from Microsoft with large number of types:
Minimal repro (the rest of the script is commented out)
@dsyme I think the problem is not with slow compiler (we can do very little with it), but with rechecking that FsSqlDom.dll assembly every time the script is type checked. Clearly it's a bug.
Expected behavior: Intellisense works in at most 1 second (red line appearing above). I'm not sure exactly what upper bound would be reasonable, but if it takes more than a second or two, it is hard to make use of it.
Unfortunately, we cannot change the delay Roslyn takes before asks us for fresh diagnostics analysis after a document is changed. If I remember correctly it's about 1.5 seconds. @CyrusNajmabadi explained that they did a research and conclude that such delays are the most comfortable for developers. Read this dotnet/roslyn#18376
Unfortunately, we cannot change the delay Roslyn takes before asks us for fresh diagnostics analysis after a document is changed. If I remember correctly it's about 1.5 seconds. @CyrusNajmabadi explained that they did a research and conclude that such delays are the most comfortable for developers. Read this dotnet/roslyn#18376
@vasily-kirichenko@CyrusNajmabadi - I've noticed this problem too and I do feel like the delay is too long for F# programmers, particularly when writing data scripts. I'm not sure why - but I think the highly type-inferred nature of F# may mean that people rely on the presence of red-squigglies to give very quick error feedback.
I'll comment more on the roslyn thread mentioned above, but I'd like us to try to make this configurable for F#.
Reacted by Vasily Kirichenko, Phillip Carter and Isak Sky
We've investigated the delays and made considerable improvements #3238. This includes a fix for a potentially unbounded delay in large files, as described in the PR, as well as other improvements
Activity
vasily-kirichenko commentedon May 7, 2017
Minimal repro (the rest of the script is commented out)
@dsyme I think the problem is not with slow compiler (we can do very little with it), but with rechecking that
FsSqlDom.dllassembly every time the script is type checked. Clearly it's a bug.vasily-kirichenko commentedon May 7, 2017
I've checked if we pass same
FSharpProjectOptionsto checker - we do. Options created here https://github.com/Microsoft/visualfsharp/blob/master/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs#L141 is same as cached (in sense ofFSharpProjectOptions.AreSameForChecking). I've no further ideas why checker rechecks assemblies.vasily-kirichenko commentedon May 7, 2017
getOrCreateBuilderreturns cachedIncrementalBuilder, so something wrong with imported assemblies cache?dsyme commentedon May 7, 2017
Yeah must be something wrong with the "timestamp" logic. I was looking at some related issues today. Will take a look tomorrow
vasily-kirichenko commentedon May 8, 2017
Unfortunately, we cannot change the delay Roslyn takes before asks us for fresh diagnostics analysis after a document is changed. If I remember correctly it's about 1.5 seconds. @CyrusNajmabadi explained that they did a research and conclude that such delays are the most comfortable for developers. Read this dotnet/roslyn#18376
dsyme commentedon May 8, 2017
@vasily-kirichenko @CyrusNajmabadi - I've noticed this problem too and I do feel like the delay is too long for F# programmers, particularly when writing data scripts. I'm not sure why - but I think the highly type-inferred nature of F# may mean that people rely on the presence of red-squigglies to give very quick error feedback.
I'll comment more on the roslyn thread mentioned above, but I'd like us to try to make this configurable for F#.
CyrusNajmabadi commentedon May 8, 2017
We could definitely expose this through an API so you could configure it for F#.
vasily-kirichenko commentedon May 8, 2017
@CyrusNajmabadi please, expose it.
dsyme commentedon May 8, 2017
@CyrusNajmabadi Yes, pretty please with sugar on top :)
cartermp commentedon May 8, 2017
Issue on Roslyn here: dotnet/roslyn#19347
[-]Type checking performance problems (related to having many types?)[/-][+]Type checking responsiveness in IDE[/+]dsyme commentedon Jun 22, 2017
We've investigated the delays and made considerable improvements #3238. This includes a fix for a potentially unbounded delay in large files, as described in the PR, as well as other improvements
dsyme commentedon Jun 22, 2017
@isaksky I looked at your repro
https://github.com/isaksky/FsSqlDom/blob/master/examples/GraphTableRelationships.fsx
In normal editing in that file errors now take 3-4 seconds to refresh
isaksky commentedon Jun 23, 2017
@dsyme This is great news!
dsyme commentedon Jun 23, 2017
@isaksky Please try master or nightlies as they become available. The more you can validate (and find new issues with repros) the better
BTW all the very best for XLedger - exciting!
toburger commentedon Jun 23, 2017
I can confirm that build 15.4.1.17062301 is now much faster and responsive.