Csla Performance advice

Csla Performance advice

Old forum URL: forums.lhotka.net/forums/t/5997.aspx


decius posted on Monday, December 15, 2008

I'm trying to optimize our Csla-built security infrastructure.  I've run across some very surprising results and I was hoping for some advice regarding performance optimization. 

Obviously, my first step to optmize was to get rid of dead weight in our Identity... This is where I am baffled.  I removed what was about 30 of 39 string properties of the identity that we weren't really using, which also sped up the stored procedure since it didn't have to parse as much.  Also, eliminated a dr.Read for each property in the DataAccess... However, I am seeing the opposite I would have thought when using RedGate's AntsProfiler to analyze performance!  Performance got WORSE, but just slightly.  I have run many many tests at this point that all show this result.

I have spent two days trying to figure out what could cause that to happen.  I have tried various different DataPortal proxies (DotNetRemoting, WebServices, Wcf) and they all show the same.

The only thing I can think of is that I made another small nested Criteria class in the Identity (IsSignedInCriteria and LoginCriteria, which was previously one larger class called "Criteria").  I figured that this would improve performance, but maybe it slowed it down???  Is this maybe resulting in a lot of extra serialization work that's unnecessary? 

Below is the 2 new Criterias

[Serializable()]

private class LoginCriteria

{

public string Username;

public string SessionID;

public string Environment;

public LoginCriteria(string username, string sessionID, string environment)

{

this.Username = username;

this.SessionID = sessionID;

this.Environment = environment;

}

}

[Serializable()]

private class IsSignedInCriteria

{

public string UserId;

public string SessionId;

public IsSignedInCriteria(string userId, string sessionId)

{

this.UserId = userId;

this.SessionId = sessionId;

}

}

 

Thanks for any help.

Copyright (c) Marimer LLC