Monday, July 23, 2012

Performances issues with big lists

We were noticing some performances issues with big lists (say around 2500 rows not big enough in my mind) and users began to see slowness and this can be caused due to many reasons. As part of trouble shooting we tried to look at the performance counters on the web, app and SQL server and did not notice any major bumps. We started SQL profiler and we noticed significant duration being taken while rendering the results or displaying the list items. Then we looked at this link published by Microsoft http://technet.microsoft.com/en-US/library/cc262813.aspx and found the issue with Row Wrapping. We exceed the number of columns for the Multiline text filed that needs to be in a single Row. We changed couple of fields to the Single Line of text and we found significant improvement in performance. We also indexed the columns that re commonly used in the Views(http://office2010.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010378155.aspx?redir=0#_Toc268174145)

Hope this helps for someone who runs into similar problem.

Sunday, July 1, 2012

How to get SPUser object from String

String UserName= “Srikanth Kancharla”;

SPUser User= SPWeb.EnsureUser(UserName);

SPWeb.EnsureUser():Checks whether the specified logon name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.