abe545 / CodeOnlyStoredProcedures

A library for easily calling Stored Procedures in .NET using only code (no xml or gui).
MIT License
4 stars 3 forks source link

First execution of a stored procedure is significantly slower #11

Closed abe545 closed 9 years ago

abe545 commented 9 years ago

Apparently compiling expressions is very slow. Moving to Reflection.Emit will reduce the time a lot.

abe545 commented 9 years ago

This apparently only happens when run in the debugger under Visual Studio. I'm not sure if switching to Reflection.Emit helps in any measurable way, as the startup time is still much longer in the debugger after using it. It seems that loading the symbols is what is taking the time. For this reason, I'm going to change the code back to using Expressions, as it is clearer.