0

I have a very basic webpartt which has a telerik tab control and 7 different tab with some controls on it. It is using Linq to sharepoint lists to retrieve data from lists.

I added this web part to a page, but it is awfully slow. I have vetted my code, but could not find anything which may cause performance issue(it is a simple query anyway)

here is the developer dashboard output

Database Queries
proc_FetchDocForHttpGet 32.53 ms
proc_FetchDocForHttpGet 21.27 ms
proc_GetWebMetainfo 21.82 ms
proc_GetParentWebUrl    4.63 ms
proc_GetTpWebMetaDataAndListMetaData    10.02 ms
proc_GetWebMetainfo 8.54 ms
proc_GetParentWebUrl    4.87 ms
proc_GetTpWebMetaDataAndListMetaData    10.40 ms
proc_EnumLists' CommandType:    12.07 ms
proc_GetListMetaDataAndEventReceivers   10.05 ms
proc_GetTpWebMetaDataAndListMetaData    12.13 ms
proc_EnumLists' CommandType:    11.12 ms
proc_GetListMetaDataAndEventReceivers   172.78 ms
SELECT t2.[tp_Created]  8.10 ms
proc_GetWebNavStruct    7.93 ms
SELECT t2.[tp_Created]  7.45 ms

and

WebPart Events Offsets
SPWebPartManager OnLoad +0.00 ms
Web Part Page Title Bar OnLoad  +0.02 ms
OnLoad  +0.02 ms
SPWebPartManager OnPreRender    +0.00 ms
Web Part Page Title Bar OnPreRender +0.24 ms
OnPreRender **+12475.23 ms**

Someone mentioned in another question that disabling publishing service fixed the issue.

But I am using SharePoint Foundation 2010, so I do not have publishing service.

Do you have any idea what caused this slowness?

P.S: the server app is running on has 4 Cores and 8 GB RAM, also database server is on a very beefy server(different from web app)

Thanks

4
  • 1
    How many rows/columns are being pulled back? I'd bet that one of your queries is tapping a large list and not filtering on an indexed field
    – Dave Wise
    Feb 10, 2014 at 19:25
  • Well, just one:) Basically, there is a list where a user appraisal is created, and we retrieve that by logged user. that is it. but on appraisal list, there are 3000 rows. Also, it retrieves some data from another list which has around 8000 rows, I am not sure how this will impact the performance Feb 10, 2014 at 19:26
  • did you solved that problem ? i have exactly same trouble, and i don't know variants for resolve it Dec 3, 2014 at 14:10
  • solution was not use LINQ to SP... Dec 3, 2014 at 16:04

1 Answer 1

1

I'm no expert on Linq to SharePoint but it does have a long history of major performance issues. Here are some links that might point you towards an answer for your particular situation.

The first link is probably the most useful as it shows how simple changes to a Linq query can cause significant delays in run time. The other two provide more than ample evidence as to why you should be careful when using Linq to SharePoint.

As is often the case when using wrapper technologies, the devil is in the details of the implementation

2
  • But, the database queries seem to be OK right? around 400MS. but the rest takes 12 sec... I am not sure it is LINQ to Sharepoint's fault. What do you think? Feb 11, 2014 at 9:57
  • When in doubt, I would start out focusing on the components known for this behavior and then fan outward. If you comment out all of the Linq code and response time drops to 1-2 seconds then you have the culprit. if not, then you need to look elsewhere.
    – Dave Wise
    Feb 11, 2014 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.