We are using enterprise library with object data scource event on the telerik radgrid. Currently we are fixing performance related fixes. but the below highlighted line took more than 15S to cross. Is it possible to do it within a second. Quick help would
be much appreciated.
15 seconds is meaningless without knowing how many elements you are reading. So my first thought would be just retrieving too much data. See also if you could have blob columns such as a long text or an image). You could also test what happens for a single
line to aghve a rough estimate of your network performance.
Not directly related but I'm failry sure the returned value is never null (it should return an empty list if no data is found) so the results!=null is likely always true anyway.
Thanks for your response. 15 columns with 50 rows itself is taking time to cross that line. Also the column length is very short not too big. So is there any other code can we use instead of results.ToList<Entity>()>.Basically
we need some performance on this line when we debug and this line took approx 10S to cross.
ToList should trigger a db call (not using it but I assume it is similar to EF?). You convert what you got from the db. BTW what happens if you compare a simple ToList() call with a ToList<Entity> call? Does it make a difference in speed?
Not sure. We are using enterprise architecture and this is inbuilt code. As per Microsoft practices and patterns ,ENT.LIB used this code by default. Can anyone please suggest why are we having slowness in this code.
None
0 Points
22 Posts
MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this line
Nov 19, 2015 09:02 AM|rajasekarandeepan|LINK
Dear Team,
We are using enterprise library with object data scource event on the telerik radgrid. Currently we are fixing performance related fixes. but the below highlighted line took more than 15S to cross. Is it possible to do it within a second. Quick help would be much appreciated.
results = db.ExecuteSqlStringAccessor<ProfileProjectDetails>(transaction, sql);
List<Entity> resultsList = null;
if (results != null){ resultsList = results.ToList<Entity>();} - This line took more than 15S to cross.
Thanks
Deepan.
All-Star
48500 Points
18071 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 19, 2015 01:05 PM|PatriceSc|LINK
Hi,
15 seconds is meaningless without knowing how many elements you are reading. So my first thought would be just retrieving too much data. See also if you could have blob columns such as a long text or an image). You could also test what happens for a single line to aghve a rough estimate of your network performance.
Not directly related but I'm failry sure the returned value is never null (it should return an empty list if no data is found) so the results!=null is likely always true anyway.
None
0 Points
22 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 20, 2015 02:19 AM|rajasekarandeepan|LINK
Hi,
Thanks for your response. 15 columns with 50 rows itself is taking time to cross that line. Also the column length is very short not too big. So is there any other code can we use instead of results.ToList<Entity>()>.Basically we need some performance on this line when we debug and this line took approx 10S to cross.
All-Star
48500 Points
18071 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 20, 2015 03:01 AM|PatriceSc|LINK
Ok so is this solved? It would be the line which is really slow between the web and the db server? They are not at the same location?
None
0 Points
22 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 20, 2015 07:36 AM|rajasekarandeepan|LINK
No this is not solved. There is no DB hit in this line .We are just converting the items into Entity list.
All-Star
48500 Points
18071 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 20, 2015 12:50 PM|PatriceSc|LINK
ToList should trigger a db call (not using it but I assume it is similar to EF?). You convert what you got from the db. BTW what happens if you compare a simple ToList() call with a ToList<Entity> call? Does it make a difference in speed?
None
0 Points
22 Posts
Re: MIcrosoft Enterprise library - Slowness in results.ToList<Entity>(); took 15S to cross this l...
Nov 23, 2015 12:12 PM|rajasekarandeepan|LINK
Not sure. We are using enterprise architecture and this is inbuilt code. As per Microsoft practices and patterns ,ENT.LIB used this code by default. Can anyone please suggest why are we having slowness in this code.
Thanks
Deepan.