Hi,
Just to clarify, I'm not accusing LLBLGenProDataSource2 of having any performance issues, but we're having a strange time trying to work out what is wrong here...
Basically, inside a user control I am using a LLBLGenProDataSource2 object, and because I need a fine level of control with it, I specify its binding methods like so:-
<llblgenpro:llblgenprodatasource2 ID="fuelsData" runat="server"
AdapterTypeName="Blah"
DataContainerType="EntityCollection"
EntityFactoryTypeName="Blah"
EnablePaging="False" AllowDuplicates="False" LivePersistence="false" OnPerformGetDbCount="GetDbCount" OnPerformSelect="PerformDBSelect" OnPerformWork="PerformWork">
</llblgenpro:llblgenprodatasource2>
Currently it takes about 1 second for this user control to render (this is a problem because the user control is in a repeater of about 15 items). There is no existing data for it to load up, so the PerformSelect returns 0 rows. According to SQL Profiler, all the SQL generated while displaying this user control runs ultra-fast and takes up no time at all, but somewhere there is a lag while something happens. My PerformSelect method looks like this
protected void PerformDBSelect(object sender, PerformSelectEventArgs2 e)
{
IDataAccessAdapter da = DataAccessAdaptorFactory.GetDataAccessAdaptor();
da.FetchEntityCollection(e.ContainedCollection, e.Filter, 0, e.Sorter, e.PrefetchPath);
}
Nothing too weird there. If I comment the code out so it does nothing, I find that my user control renders almost instantly - 0.08 seconds to be exact.
I know I am asking a difficult question because there could be all-sorts going on that you don't know about, but does anyone know any common "gotcha's" that might be causing problems for me? One thing that I don't understand is that my LLBLGenProDataSource2 has a filter defined in the code behind, but when I examine the SQL Profiler outout I can see a select statement that selects all fields from the table, without any predicate specified, and one that does have the predicate - both are coming from the PerformSelect method...
Any thoughts welcome...