Home

Linqpad Intellisense very slow

2»

Comments

  • I'm pretty sure your problem is different to Jeff's, and most likely related to the environment. The log strongly indicates that the issue is not caused by a bug in LINQPad.

    @JeffMercado - what you describe implies a (kind of) memory leak. Are you able to give me a series of steps to reproduce this? I've tried monitoring memory consumption during editor activity with an ordinary query and cannot produce any leak, so it must require something special.

  • edited January 22

    I don't think I'm doing anything particularly special, just editing a fairly large script with several other decently sized scripts included and have LINQPad running for long sessions (days). Utilizes all the latest C# and LINQPad features (async/await, asyncenumerable, readonly properies, expression-bodied members, nullable reference types, namespaces within scripts, etc.). The one I notice this the most is essentially an asynchronous console app to automate some tasks within TFVC and syncs to a local git repository making heavy use of async/await and some web apis.

    I tried monitoring the memory usage as I edited and it seems to increase more rapidly as I mouse over different symbols, use autocompletion (Ctrl + Space), and just use the editor in general. This all goes away when I close the affected script and reopen.

    Some other anomalies I notice that may or may not matter here involve the way the intellisense either shows the items or what it chooses to show. It looks like there's no distinction for nullable reference types when the type is shown (i.e., a variable of type string? is displayed as string). When using an object initializer as arguments to a method call, LINQPad can't figure out what intellisense to show at times, depending on where the caret is located. Sometimes it will show the parameter intellisense info, other times it will show the member names of the object being initialized, otherwise it would do neither and just show all names in scope.

    Note this also occurred in v5 as well, only this is happening way more frequently this time around with a completely new set of scripts.

  • I tried monitoring the memory usage as I edited and it seems to increase more rapidly as I mouse over different symbols, use autocompletion (Ctrl + Space), and just use the editor in general.

    Sorry, I should have pointed out that you need to initiate a GC before knowing whether more memory has genuinely been consumed. You can do this by pressing Shift+Alt+G. (This triggers a GC in both the current query and the host process.)

  • I'll be sure to do that and report my findings here.

  • Tried garbage collecting in the script and it is not making a dent. Memory usage by LINQPad is sitting at 2GB. I have two scripts open for over a day, the main script (~600 lines, major changes, having the slowness) and one of it's loaded scripts (~400 lines, minor changes, not having the slowness)

Sign In or Register to comment.