Poor LpRun startup performance for simple script

When I have LinqPad up and running new scripts I write compile and execute nearly instantaneously.

However, when running on the command line via LpRun there is quite a long delay even for a trival script (~3-4 seconds).

I'm thinking of working around this by creating an LpRun background process that listens for execution requests and executes them using Util.Run() to avoid the startup overhead.

However, I'm wondering whether others have experienced this performance issue and whether built-in approaches are available for working around this?

Comments

  • I also experience the same thing, lprun takes about 4 seconds to return the result of something simple like:

    void Main(string[] args)
    {
    string.Format("{0}", args).Dump();
    }
    so it'd sure be great to find ways to speed it up.

    for some reason, I used to think it was quicker if I had the LINQPad GUI running, but I've just tested and it seems to make no difference now...
  • The release version of LINQPad ngens the Roslyn assemblies on installation. However, if you've xcopy-deployed LINQPad, this won't happen automatically. To do this, follow the instructions in the file "lprun readme.txt":

    Open the administrator command prompt, and call:

    LINQPad.exe -ngen

    Note that this won't work with the current beta, because it includes two (conflicting) sets of Roslyn assemblies - one release set and one experimental set for playing with nullable reference types.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!