Skip to Content
Main Content

Hiker Looking Out Over Mountains

5 Minute Read | June 6, 2022

Three Tips for Improving SharePoint Online Performance

Updated: June 6, 2022
Originally Published: July 23, 2018

 

Microsoft offers SharePoint developers an abundance of tools and many ways to solve any given problem, and that’s fine. But without proper understanding of those means and options and of their implications for your business needs, you can get into trouble.

The tips that follow can help you stay out of trouble and give your end users the best possible experience as they work in SharePoint.

1. Use Content Delivery Networks When Possible

Users close to your SharePoint instance get great service. Those farther away get worse service. A Content Delivery Network (CDN) closes the geographic gap by allowing you to reference common JavaScript and CSS libraries hosted somewhere other than in one folder on one site in your entire site collection. Adding references to a CDN that hosts a library such as jQuery will improve the load time for that file, for both near and distant users. CDNs are designed to be highly distributed and extremely fast.

Sample of jQuery code

An example of a reference to the jQuery UI library hosted on the Microsoft CDN.


That said, we do not recommend using CDNs if your SharePoint environment is on-premises. In an on-premises environment, users should always be connected to the network hosting the environment. If an internet connection goes down, users would not be able to download files from a CDN, but they could still access on-premises SharePoint. If you do use a CDN for some resources in your on-prem environment, make sure you have a copies of the files related to those resources on your SharePoint environment, referenced as a failover. That way, users can keep working normally when external resources won’t load.

Microsoft’s Ajax CDN is a great resource for commonly used JavaScript frameworks and CSS libraries such as jQuery, Bootstrap, jQuery UI, and jQuery Datatables.

2. Use the Content Search Web Part Instead of the Content Query Web Part

SharePoint content managers, developers, and administrators might need to display content -- e.g., a list of news items, a list of employees, or benefits documents -- on a page. Microsoft provides two built-in web parts for rolling up content for display. Many developers and administrators default to the Content Query Web Part because it’s easier to configure, but the Content Search Web Part offers better performance. It also queries content that exists across multiple site collections, while the Content Query Web Part is limited to one site collection.

 

 
Configuring the Content Query Web Part is similar to setting up a new SharePoint list view, although it does not offer the best performance.

 

The Content Query Web Part directly hits the content database with its queries; the Content Search Web Part, by contrast, queries against a search index created when the search service crawls your site content and adds new or updated content to the search index. This prevents an overload of calls to your content database.

Note: SharePoint Online environments are crawled several times each day, because content is being managed and updated continuously. Note that in cloud-based SharePoint, you have no control over when or how frequently your site collection is crawled. This control is only available in on-prem environments.

 

  

Setting up a Content Search Web Part takes quite a bit m ore configuration, but is much more powerful and scalable.

 

Another big difference in the Content Rollup web parts is that the Content Query Web Part does not perform as well for large lists, which Microsoft defines as a list of more than 5,000 items. So Content Query Web Part does not scale-up well. It performs admirably below the 5,000 threshold, but if you expect your content to grow, opt for the Content Search Web Part.

3. Optimize Images

Using Image Renditions

SharePoint Online’s Image Renditions feature allows you to predefine image sizes, then choose which rendition to display when you add an image to a page. You cannot rely on CSS alone to resize images for you, because CSS resizes images only after loading the full-resolution version of the image. Image Renditions will take the smaller of the two dimensions defined for a rendition, then crop the other dimension from the center of the image.

 

When adding an image to a page, you can choose the rendition to help the page load faster, instead of relying on CSS to resize your images.

 

Note: Publishing must be enabled on your site and the Publishing Infrastructure must be enabled at the site collection level to use the Image Rendition feature.

Delaying Image Loading

By default, browsers pre-fetch images, which delays the page load until all images and the rest of the page content have been downloaded. To mitigate longer page load times, use HTML data attributes and JavaScript to delay loading of images – especially those below the fold and out of view as the page loads -- until after the rest of the page content has loaded.

For more information, see our blog on optimizing images.

If you need additional guidance or support to optimize your SharePoint performance, don't hesitate to contact us.

Authored By

Aaron Stearns

Aaron Stearns

Full Stack Developer

Amanda Aalpoel

Amanda Aalpoel

Back End Developer

hand-drawn owl

Get Expert Tips

3616511/Blog/Three-Tips-for-Improving-SharePoint-Online-Performance5
<p><span class="h6">Updated: June 6, 2022<br /> Originally Published: July 23, 2018</span></p> <p>&nbsp;</p> <p>Microsoft offers SharePoint developers an abundance of tools and many ways to solve any given problem, and that&rsquo;s fine. But without proper understanding of those means and options and of their implications for your business needs, you can get into trouble.</p> <p>The tips that follow can help you stay out of trouble and give your end users the best possible experience as they work in SharePoint.</p> <h2>1. Use Content Delivery Networks When Possible</h2> <p>Users close to your SharePoint instance get great service. Those farther away get worse service. A Content Delivery Network (CDN) closes the geographic gap by allowing you to reference common JavaScript and CSS libraries hosted somewhere other than in one folder on one site in your entire site collection. Adding references to a CDN that hosts a library such as jQuery will improve the load time for that file, for both near and distant users. CDNs are designed to be highly distributed and extremely fast.</p> <p style="text-align:center"><img alt="Sample of jQuery code" loading="lazy" src="/Northwoods-2020/Blogs/blog_cdn.PNG" /></p> <p style="text-align:center"><em>An example of a reference to the jQuery UI library hosted on the Microsoft CDN.</em></p> <p><br /> That said, we do not recommend using CDNs if your SharePoint environment is on-premises. In an on-premises environment, users should always be connected to the network hosting the environment. If an internet connection goes down, users would not be able to download files from a CDN, but they could still access on-premises SharePoint. If you do use a CDN for some resources in your on-prem environment, make sure you have a copies of the files related to those resources on your SharePoint environment, referenced as a failover. That way, users can keep working normally when external resources won&rsquo;t load.</p> <p><a href="https://docs.microsoft.com/en-us/aspnet/ajax/cdn/" linktype="3" target="_blank">Microsoft&rsquo;s Ajax CDN</a> is a great resource for commonly used JavaScript frameworks and CSS libraries such as jQuery, Bootstrap, jQuery UI, and jQuery Datatables.</p> <h2>2. Use the Content Search Web Part Instead of the Content Query Web Part</h2> <p>SharePoint content managers, developers, and administrators might need to display content -- e.g., a list of news items, a list of employees, or benefits documents -- on a page. Microsoft provides two built-in web parts for rolling up content for display. Many developers and administrators default to the Content Query Web Part because it&rsquo;s easier to configure, but the Content Search Web Part offers better performance. It also queries content that exists across multiple site collections, while the Content Query Web Part is limited to one site collection.</p> <p>&nbsp;</p> <p style="text-align:center"><img alt="" loading="lazy" src="/Images/Blogs/NWS/ImprovingSharePoint2.png?Large" />&nbsp;<br /> <em>Configuring the Content Query Web Part is similar to setting up a new SharePoint list view, although it does not offer the best performance.</em></p> <p>&nbsp;</p> <p>The Content Query Web Part directly hits the content database with its queries; the Content Search Web Part, by contrast, queries against a search index created when the search service crawls your site content and adds new or updated content to the search index. This prevents an overload of calls to your content database.</p> <p>Note: SharePoint Online environments are crawled several times each day, because content is being managed and updated continuously. Note that in cloud-based SharePoint, you have no control over when or how frequently your site collection is crawled. This control is only available in on-prem environments.</p> <p>&nbsp;</p> <p style="text-align:center"><img alt="" loading="lazy" src="/Images/Blogs/NWS/ImprovingSharePoint3.png" />&nbsp;<img alt="" loading="lazy" src="/Images/Blogs/NWS/ImprovingSharePoint4.png" />&nbsp;</p> <p style="text-align:center"><em>Setting up a Content Search Web Part takes quite a </em><em>bit m</em>&nbsp;<em>ore configuration, but is much more powerful and scalable.</em></p> <p>&nbsp;</p> <p>Another big difference in the Content Rollup web parts is that the Content Query Web Part does not perform as well for large lists, which Microsoft defines as a list of more than 5,000 items. So Content Query Web Part does not scale-up well. It performs admirably below the 5,000 threshold, but if you expect your content to grow, opt for the Content Search Web Part.</p> <h2>3. Optimize Images</h2> <h3>Using Image Renditions</h3> <p>SharePoint Online&rsquo;s Image Renditions feature allows you to predefine image sizes, then choose which rendition to display when you add an image to a page. You cannot rely on CSS alone to resize images for you, because CSS resizes images only after loading the full-resolution version of the image. Image Renditions will take the smaller of the two dimensions defined for a rendition, then crop the other dimension from the center of the image.</p> <p>&nbsp;</p> <p style="text-align:center"><img alt="" loading="lazy" src="/Images/Blogs/NWS/ImprovingSharePoint5.png" /></p> <p style="text-align:center"><em>When adding an image to a page, you can choose the rendition to help the page load faster, instead of relying on CSS to resize your images.</em></p> <p style="text-align:center">&nbsp;</p> <p>Note: Publishing must be enabled on your site and the Publishing Infrastructure must be enabled at the site collection level to use the Image Rendition feature.</p> <h3>Delaying Image Loading</h3> <p>By default, browsers pre-fetch images, which delays the page load until all images and the rest of the page content have been downloaded. To mitigate longer page load times, use HTML data attributes and JavaScript to delay loading of images &ndash; especially those below the fold and out of view as the page loads -- until after the rest of the page content has loaded.</p> <p>For more information, <a href="/Blog/Optimizing-Image-Sizes-On-Your-Website" linktype="8" target="_self">see our blog on optimizing images.</a></p> <p><em>If you need additional guidance or support to optimize&nbsp;your SharePoint performance, don&#39;t hesitate to <a href="/Contact-Us" linktype="2" target="_self">contact us</a>.</em></p>
/Northwoods-2020/Hero-Images/Hiker-Looking-Out-Over-Mountains.pngHiker Looking Out Over MountainsAaron Stearns | Amanda Aalpoel/Northwoods-2020/People/Aaron-Stearns.pngMan standing in front of a log cabin with soft, warm lighting<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script><script>hbspt.forms.create({ region: "na1", portalId: "23630176", formId: "40c5bbae-05a2-42ea-94dd-1662181fd56e" });</script>/Northwoods-2020/Blogs/Social-Media-Cards/Three-Tips-for-Improving-SharePoint-Online-Performance---Blog.jpg?LargeThree Tips for Improving SharePoint Online Performance2022-06-06T00:00:00/Northwoods-2020/Blogs/Social-Media-Cards/Three-Tips-for-Improving-SharePoint-Online-Performance---Blog.jpgThree Tips for Improving SharePoint Online PerformanceMicrosoft offers SharePoint developers an abundance of tools and many ways to solve any given problem. But without proper understanding of available options and the implications for your business needs, you can get into trouble. Check out these tips for giving your end users the best possible experience as they work in SharePoint.3618710/People/Aaron-StearnsAaronStearnsFull Stack Developer<p>Aaron is an Azure Certified full-stack developer with a knack for quickly making sense of complex business and technology process scenarios. With a strong focus on user experience, mobile-friendly design, and JavaScript API development, Aaron provides robust web sites and tools with a focus on quality over quantity. His techniques have tamed SharePoint environments, automated multi-level enterprise workflows, and delighted users with interactive dashboards. Away from the office, Aaron enjoys gaming, drawing, and taking care of his adopted backyard wildlife. (Be sure to ask about his squirrel cookie recipe!)</p>Aaron Stearns/Northwoods-2020/People/Aaron-Stearns.pngAaron StearnsAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesNWS Data ModulesTopic - NWS Data ModulesPackage Type - NWS Data ModulesPersonID - NWS Data ModulesAaron StearnsProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data ModulesTeamAll StaffDevelopers3618812/People/Amanda-AalpoelAmandaAalpoelBack End Developer<p>Amanda is a full stack developer with a talent for improving interface designs, navigating the complexities of custom web app development, and Azure resource administration. She&rsquo;s experienced in SharePoint site intranet customization and business intelligence reporting and is certified as an Azure Developer Associate. Amanda enjoys getting to know clients and their specific needs to produce results that are functional, modern, and sustainable. In her free time, she enjoys video games and hanging out with her dog Leia.</p>Amanda Aalpoel/Northwoods-2020/People/Amanda-Aalpoel.jpgAmanda AalpoelAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesNWS Data ModulesTopic - NWS Data ModulesPackage Type - NWS Data ModulesPersonID - NWS Data ModulesAmanda AalpoelProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data ModulesTeamAll StaffDevelopersAdd-In Type - NWS Data ModulesCategory - NWS Data ModulesCommittee - NWS Data ModulesDivision - NWS Data ModulesEvent Audience - NWS Data ModulesEvent Service - NWS Data ModulesEvent Type - NWS Data ModulesLocality - NWS Data ModulesModule - NWS Data ModulesNWS Data ModulesTopic - NWS Data ModulesSoftware DevelopmentPackage Type - NWS Data ModulesPersonID - NWS Data ModulesAaron StearnsAmanda AalpoelProductVersion - NWS Data ModulesRecorded Webinar TopicsRegion - NWS Data ModulesSite Display - NWS Data ModulesNWS DigitalSkillLevel - NWS Data ModulesTopic - NWS Data ModulesVideoAudience - NWS Data ModulesVideoClassification - NWS Data ModulesVideoStatus - NWS Data Modules02022-07-14T13:41:00.09000