SelfServicing, Adapter and performance

Posts   
 
    
orenpeled
User
Posts: 53
Joined: 25-Jul-2005
# Posted on: 26-Jul-2005 10:11:46   

Hi all,

I'm pretty new to the LLBLGen, and I need to know the main differences between SelfServicing and Adapter - which one has better performance under what conditions? I couldn't find clear answer for my question in the documentation..... cry

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 26-Jul-2005 11:15:32   

orenpeled wrote:

Hi all,

I'm pretty new to the LLBLGen, and I need to know the main differences between SelfServicing and Adapter - which one has better performance under what conditions? I couldn't find clear answer for my question in the documentation..... cry

The core difference between them is in how you look at things. This is described in "Concepts - Template sets - When to use which template group?"

Performance is the same, sometimes one is a little bit faster (0.5% or so) than the other, but neither of them is slow compared the other.

Frans Bouma | Lead developer LLBLGen Pro
orenpeled
User
Posts: 53
Joined: 25-Jul-2005
# Posted on: 26-Jul-2005 15:27:43   

Connection pooling, for example, is managed in the same way in both Adapter and SelfServicing? Can I control opening/closing/disposing connections in both Adapter and SelfServicing in same way?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 26-Jul-2005 18:29:22   

orenpeled wrote:

Connection pooling, for example, is managed in the same way in both Adapter and SelfServicing? Can I control opening/closing/disposing connections in both Adapter and SelfServicing in same way?

Getting an open connection from the pool is a feature of the ado.net provider used, so that's the same for both.

Controlling if a connection is kept open or closed is not available on selfservicing but is on adapter (DataAccessAdapter.OpenConnection() / set KeepConnectionOpen to true (this can be done in teh constructor), -> do actions, -> close connection).

Frans Bouma | Lead developer LLBLGen Pro
orenpeled
User
Posts: 53
Joined: 25-Jul-2005
# Posted on: 27-Jul-2005 08:15:35   

In this thread you've mentioned that performance is generally the same in both Adapter and SelfServicing After reading the concepts behind each one of them, I said to myself: hey, if DataAccessAdapter needs to "consult" another object in order to perform database-actions, it must be more expensive that SelfServicing, considering the fact that with SelfServicing each entity implements its own database-actions! Can you please clear this point for me?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 27-Jul-2005 09:39:19   

orenpeled wrote:

In this thread you've mentioned that performance is generally the same in both Adapter and SelfServicing After reading the concepts behind each one of them, I said to myself: hey, if DataAccessAdapter needs to "consult" another object in order to perform database-actions, it must be more expensive that SelfServicing, considering the fact that with SelfServicing each entity implements its own database-actions! Can you please clear this point for me?

true, but that's just 1 call to a routine which picks it from a hashtable, or if it's not there, it creates the objects, which is very straightforward. Profiling the two for the same action doesn't reveal a big difference, most of the time they're on par.

Frans Bouma | Lead developer LLBLGen Pro
orenpeled
User
Posts: 53
Joined: 25-Jul-2005
# Posted on: 27-Jul-2005 13:24:11   

OK, Thank you very much! smile