I. Databases
Ii. Server Settings
1. IIS Compression
IIS compression is not a new technology, but for SharePoint sites, IIS compression can play a major role. After IIS compression is enabled on the IIS server
Before sending it to the browser, the content will be compressed on the server, and then the compressed data will be sent. After the browser receives the data, it will automatically decompress it and then display it. Because it is transmitted over the network
The data is compressed, so the page content can be transmitted to the browser faster to improve the page browsing speed.
Refer to: SharePoint 2007 performance optimization-IIS CompressionFavorites
2. Index settings
Place the index directory on another disk
3. log Settings
4. SharePoint site set supports output cache settings
Ü control at the site set level
U allows you to exclude Application Pages and sub-sites
U uses different cache configuration files
U built-in cache configuration files can be used in most scenarios
Ü File Cache
Because SharePoint saves all files to the database, the file cache settings can cache SharePoint files to the disk. Enabling file caching increases access speeds and improves the performance of website sets.
Ü object Cache
U is enabled by default.
U is used to store frequently accessed list items
U site navigation structure
U column structure of the document library or list
U uses 100 MB memory by default
U uses the management interface to clear the object cache (you can also clear the File Cache)
5. Delayed download of core. js files
Core. js is the largest jscript file in SharePoint.
257 k on disk, 54 k compressed
This is not required during page loading in most anonymous user scenarios.
6. Follow the list (Document Library) Performance
Ü comply with Microsoft's performance recommendations for lists and document libraries:
U do not store more than 2000 data items in a folder
U a document library cannot contain more than 1000 folders
Ü reasonably use the index bar
7. Program Optimization
(1) The object model of the List is available, but for queries and the like, use the caml query statement whenever possible. Next we will compare the differences between an object model query and a CAML query.
SPWeb web = site. OpenWeb ();
SPList list = web. Lists ["userlist"];
// Section 1: In a user table, if you want to find a data entry named
Foreach (SPListItem item in list. Items)
{
If (item ["name"]. ToString () = "")
{
Name = item ["name"]. ToString ();
Break;
}
}
// Step 2. If you use another method
SPQuery spq = new SPQuery ();
String query = "<Where>"
+ "<Eq>"
+ "<FieldRef Name = \" name \ "/>"
+ "<Value Type = \" Text \ "> a </Value>"
+ "</Eq>"
+ "</Where> ";
Spq. Query = query;
SPListItemCollection lic = list. GetItems (spq );
String name = "";
Foreach (SPListItem item in lic)
{
Name = item ["name"]. ToString ();
}
Note: In section 1, you can retrieve all the data items in the list and then query them. In section 2, you can retrieve the required data items and then query them. Obviously, the CAML method is faster.
(2) splistitemcollection should be converted into a able as much as possible to reduce the creation of objects.
// Procedure Section 1
Foreach (SPListItem item in list. Items)
{
If (item ["name"]. ToString () = "")
{
Name = item ["name"]. ToString ();
Break;
}
}
// Procedure Section 2
DataTable dt = list. Items. GetDataTable ();
Foreach (DataRow dr in dt. Rows)
{
If (dr ["name"]. ToString () = "")
{
Name = dr ["name"]. ToString ();
Break;
}
}
Note: When you repeatedly use the object model to obtain the list data and dataset, Section 1 adds interaction with the server. In section 2, the list data is retrieved once and then switched to the datatable for data operations, it is obviously faster to use datatable.
(3) Pay attention to the processing of the object model and try to develop the encoding methods such as using (...) {}.
// Procedure Section 1,
SPWeb web = site. OpenWeb ();
SPList list = web. Lists ["userlist"];
// In a user table, if you want to find a data entry named
Foreach (SPListItem item in list. Items)
{
If (item ["name"]. ToString () = "")
{
Name = item ["name"]. ToString ();
Break;
}
}
// Procedure Section 2
Using (SPWeb web = site1.OpenWeb ())
{
List = web. Lists ["userlist"];
// If you use another method
Foreach (SPListItem item in list. Items)
{
If (item ["name"]. ToString () = "")
{
Name = item ["name"]. ToString ();
Break;
}
}
}
Note: After an object is created in section 1, the object is not closed and the server load is added. After using is used in the program segment, the created objects are automatically destroyed. Obviously, the using method is better.