Is anyone experiencing very slow execution times with SP wrapped in LLBLGEN?

Posts   
 
    
JayMan
User
Posts: 9
Joined: 02-May-2006
# Posted on: 25-Oct-2006 09:30:26   

We are experiencing a very strange phenomenon. When we access an entity by its PK, it is very fast. But we have some old stored procedures that also fetch records based on Primary Key. Executing the SP through RetrievalProcedures takes about 10-12 times longer than fetching using FetchEntity.

Changing the SP to use entities is an option. But I am curious to know if others are also having similar problems.

Configuration: LLBLGEN 2.0 Sql Server 2005 Asp.net 2.0 Visual Studio 2005 Profiler : RedGate Ants Profiler

Thanks for reading. Jay

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 25-Oct-2006 09:48:18   

I did not face this problem before.

But please provide the runtime Library version as stated here: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7725 Because I think there was an issue in an older release that was solved.

Maybe you can try to download an install the latest release. And check to see if the problem disappear. And if not, please post the SP Code with the related tables structure.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 25-Oct-2006 10:04:39   

The call to the sp is in generated code, so could you please step through the code and see where the slowdowns occur? After all, all it does is call a proc using normal ADO.NET code.

And as Walaa said, there was an issue with a regex being re-created every time a proc was called, for name overwriting, which was fixed some time ago. However that was not a noticable slowdown, more in the milliseconds than seconds.

Frans Bouma | Lead developer LLBLGen Pro
JayMan
User
Posts: 9
Joined: 02-May-2006
# Posted on: 27-Oct-2006 06:08:18   

Hi Walaa & Otis, Thanks for responding.

The version I am using is 2.0.0.0 - July 1st 2006 Release.

Here is the SP code - it is a simple record fetch based on the PK. The recordsize is also under 500 bytes - mostly FKs.

BEGIN SET NOCOUNT ON; SELECT * From [User] Where UserID = @UserID END

This is around 12 times slower than a similar FetchEntity. The speed has been adjudged after 62 iterations and the time taken averaged between the calls.

Of course, we are moving it to an Entity, but I was wondering if there is a penalty in calling SPs through LLBLGEN. Just wondering. Do we have to port other - more complex - SPs to TypedList ? Are they taking a performance hit too by executing inside SPs?

Regards, Jay

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Oct-2006 09:02:25   

First, please try to use the latest release. And see if the problem still exists.