RickStrahl/Westwind.Scripting

First time slow performance for ExecuteCodeAsync

joshidp opened this issue · 2 comments

First call is slow for ExecuteCodeAsync , is there a way to avoid it with some pre-compilation?

There's no way to avoid the first time hit of loading the Roslyn libraries for compilation.

There are ways to optimize however:

  • Pre-compile your code snippets when provided and load assemblies at runtime
  • Warmup Roslyn in the Background on application Startup

I've added a section about performance to the FAQ section:

FAQ - Performance Tips

okay, thanks