Hot answers tagged

7

Generally speaking you will want to use SPQuery to only query items you're interested in. Unless you're doing SPList oList = web.GetList("XYZ"); for(int i=0; i < oList.Items.Count; i++) { string strLstItemName = oList.Items[i].Name; // << BAD, as you use Items here, so you fetch them from DB each loop } there shouldn't be any relevant ...


3

A different way to doing this is to use retention policies. You can get them to run off a given date field as well as set it to X days/months/years. No need to pause workflows as you simply run the workflows when needed. Retention should be under settings for the library/list. (Please note that I use SP2013 but it should work in SP2010 as well: ...


3

Yes, it's still valid, as it's still a SharePoint. You can read more about the limits at TechNet site: https://technet.microsoft.com/en-us/library/cc262787.aspx As you can see limitation are the same for SharePoint 2013 on premise and SharePoint online


3

I just kept more than 5 WebParts on my page but the loading time difference between page without WebPart and page with WebPart is of max 2-3 seconds. For more detailing i would like to say that i kept OOTB WebParts. And your question will not have any specific answer as the scope of answer is too wide. Still i am listing some of the thing which you must ...


2

You can also use the SharePoint Developer dashboard to troubleshoot problems with page components. If your Developer Dashboard doesn’t offer you enough information, you can make use of SPMonitoredScope in your code. How to enable it ? To enable dashboard you need to create the Usage and Health Data Collection Service Application. Use the below powershell ...


2

Couple of things to check. Check resource utlization on the Web Front servers(CPU and Memeory) Check the same thing on SQL server Enable the Verbose logging and then Check the ULS logs during that time frame. check if Object cache is properly configured enable the Developer Dashbaord and check where it is taking too much time. check if Distributed cache ...


2

Some things to consider: Make use of the object cache. You can always beef up SQL--add more memory. You can also add more servers to your farm to open up two lanes of possible web traffic. Retention policies can be set into place to clean up an environment of unused sites, content, historical data, tests, junk, redundancy, etc. On that note, you could set ...


2

For only 34 items, I wouldn't have any qualms about doing it. Workflow engine performance is affected when large numbers of workflows are paused at the same time because each time the timer job runs, it basically decompresses every paused workflow to check whether it's time to resume the workflow, and if not it then re-compresses the workflow until the next ...


2

The general view seems to be that REST is indeed more "chatty", i.e. more calls are required than CSOM and more traffic goes back and forth (although REST payloads are smaller) BUT, REST can still be faster in terms of the overall time taken. It will vary depending on different situations. My personal preference is to use REST over CSOM, especially whenever ...


2

As long as you stick to the principle of storing the SPListItemCollection in a variable before looping through the items, the difference between using for instead of foreach is close to redundant. The foreach loop will be converted into a for loop under the hood. It's a 1, perhaps 2 sec, difference. So if you write: var listItems = ...


1

Their are couple of reasons which cause the performance issue. High CPU utilization on WFE, Memory Usage on WFE High CPU and Memory Usage on the Database Traffic Unuassal Traffic on the sharepoint Structure the Farm/ site collections in a way it exceeds the MSFT recomendations i.e List views threshold violate number of columns number of web applications ...


1

Certain things can optimize it if you haven't used:- 1) Get only those columns which you require eg if you need only Title and FileReaf column then use like the below one query.ViewFields = string.Concat("", ""); 2) Set row limit It would be more easier if you can provide number of pages in that library and your caml ...


1

The retention stages Roland suggested are a great and simple solution to your needs. (I'm in 2010.) Go to the list or library settings Select "Information management policy settings" under Permissions and Management Select your content type, probably Item or Document Enable retention, then click "Add a retention stage" Set Time Period to Created Date + 1 ...


1

When you create a cache host, it should use 10% of the memory size. I say should, because that doesn’t happen all the time. Sometimes it uses 50% the memory, and sometimes 5%. Don’t ask why. But you can see the configuration of the cache cluster if you run Export-CacheClusterConfig. Use-CacheCluster Export-CacheClusterConfig -path ...


1

You should be able to do it via CAML. The query should be somewhat like this: <Where> <Or> <Eq> <FieldRef Name='ID' /> <Value Type='Number'>{FirstID}</Value> </Eq> <Eq> <FieldRef Name='ID' /> <Value Type='Number'>{SecondID}</Value> ...


1

Since you haven't specified what error occurs, below is demonstrated how to load multiple list items by their ids: var listTitle = 'Tasks'; //list title var ids = [1,2,3]; //item ids var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getByTitle(listTitle); var result = []; //for storing items ...


1

The paused workflows are serialized into the database when they are inactive, this reduces any performance concerns. When it comes time for them to "wake up" the workflow timer job brings them back to life so to speak. Based on your volume, you will be fine.


1

The Search Result web part has a set of pre-loaded display templates. So that is the reason you see templates get loaded that aren't necessary. The list of pre-loaded templates is the following: "~sitecollection/_catalogs/masterpage/Display Templates/Search/Group_Default.js", "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default.js", ...


1

You can use Visual Studio 2013/2015 Web performance and load tests feature: https://channel9.msdn.com/Events/SharePoint-Conference/2014/SPC381 https://msdn.microsoft.com/en-us/library/jj710162.aspx For the question, "how many users request per second ,latency , average number of users per day" you can use IIS Logs ...


1

You can measure the time by using a global variable like this: window.StartTime = new Date() And in your onQuerySuccess() console.log("The query returned after" + ((new Date() - window.StartTime) / (60*60)) + " seconds") You could try to use REST based api for better performance... https://msdn.microsoft.com/de-de/library/office/JJ163876.aspx


1

In the context of general c# comparistions between for and foreach - There is a pretty comphrensive discussion here for loops on List are a bit more than 2 times cheaper than foreach loops on List. Looping on array is around 2 times cheaper than looping on List. As a consequence, looping on array using for is 5 times cheaper than looping on List ...


1

You don't need any specific tool for that. Just remove the webparts one by one until you see the performance rise. If it never does, the performance problems are likely somewhere else


1

As a Start point you can do following things: Check the Hardware on the SharePoint WFE( Memory Usage and CPU), check if/which process is eating up Drive space on the SharePoint Server SQL Server Hardware checks (Connections, Memory, CPU etc) Hardware should meet the min requirement if you have multiple servers then check each individual server. Check the ...


1

Try using SPList.GetDataTable method MSDN: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.getdatatable.aspx public DataTable GetDataTable( SPQuery query, SPListGetDataTableOptions flags, out SPListItemCollectionPosition position ) With this method you can read with a single query all the information in a c# datatable. ...



Only top voted, non community-wiki answers of a minimum length are eligible