I have CLR code that generates an assembly that I install into a database using the create assembly procedures.
The code includes stored procedures and triggers.
My separate applications, of course, call the stored procedures.
My issue is that immediately after I install the library, the first time any of these triggers/procedures are called, it can take a long time for the event to occur.
In a specific case (easily recreated on my end), if I hit a trigger with specific data in my record, something is occurring at the database level that is preventing me from doing a simple edit/save. I think it's compiling the assembly. It will
work if I do an edit/save on another record, then go back to the first one. Once that happens, the issue goes away until I delete and install the assembly, then it comes back for records that meet specific criteria.
My conclusion is that it is taking so long for the JIT compiler, it's killing my post.
So, question is:
how can I force the jit compiler to process the assembly, either before or after installing the assembly to the database?
View Complete Post