Performance of application is one of the important business KPI (Key Performance Indicators) which heavily contributes to the success of business.There are ways to improve the performance of the website like performing optimization, resources upgrade and etc.
Apart from traditional approaches to improve the performance, there is a lot of buzz and talk going on for AMP (Accelerated Mobile Pages- powered by Google ) these days.
As per wikipedia– “The Accelerated Mobile Pages Project (AMP) is an open-source website publishing technology designed to improve the performance of web content and advertisements. The AMP Project led by Google is a competitor to Facebook’s Instant Articles, and includes several other large search, social and web publishing platforms around the world.”
As part of this blog post– I would like to discuss if AMP can be leveraged for Sitecore applications, advantages and disadvantages and what are some key points to be considered before we plan to integrate AMP with Sitecore.
Advantages of AMP:
- Speed and Performance-AMP provides a great user experience across many platforms
- AMP complaint content always gets displayed first in search(organic search).
- Increased mobile device site loading.
- Boost in Ranking.
- Reducing the page bounce rate and better conversions.
- No custom JS/Plugins allowed, which can affect some of the execution efforts like Pagination, listing, search,etc..
- All CSS in AMP Page should not be more than 50 KB.
- Multiple Versions required (AMP and No-AMP).
- Increased development time- Increases developer time in 2 times(AMP and Non AMP layouts).
- Strict validation rules
- Inline CSS styles.
Now, before we proceed for Integrating AMP with Sitecore, let’s check following:
- Impact on Analytics and Sitecore Analytics?
- How it affects the website functionality, like carousels, products and other features?
- Impact on Personalization in Sitecore?
- Do we need separate layout or can be managed with same default layout.
Though we know AMP is a performance booster, but it’s worth to check above points and do a analysis to understand the Integration.
Apart from just AMPiying your website another important factor is to analyze and understand what pages should be migrated to AMP like:
- Home page
- Landing pages and other top performing pages which contribute to the overall business.
Also, when when AMP should be served?- when user is trying to search contents from Google- via organic search(this is default behavior) or when user hit your page directly is a point of discussion and depends on business requirements, Let’s discuss above points as part of my next post on AMP.
Here are some case studies are available and can be used as reference to understand it better.
I am very excited about AMP and it’s integration with Sitecore, i am pretty sure you guys are too?. I hope this give you a starting point and makes you think about AMP and how it can be leveraged with Sitecore.
Happy learning 🙂
Most of us might have faced issues with performance and slow Sitecore instance,I would like to share my experience with Sitecore troubleshooting which I have learned over the period of time, these are some of the things which I feel should be checked whenever we see the application has really some performance issues.
This is one of the key factor of healthy business relation, we should make sure that application/business always meets users expectation, a non performing(from performance standpoint) site can’t guarantee a high ROI.
Here are few things i would like to mention to check the slow performing Sitecore site, and what can be done to fix it.
- Logs Reviews:
- This is one of the wonderful feature which is shipped with Sitecore, and we should make use of it to check the performance of the application, regularly checking the logs can help us in fixing the issue well before in time before it becomes critical.
- Logs can give us most of the details which includes:
- Publishing details.
- Schedule task running.
- Any code error issue.
- Indexing or query issue.
- Issue with MongoDB connectivity.
- Issue with SOLR server connectivity.
- Issue with SQL server connectivity
- Above are some of the details which we can review and proceed our investigation, it’s always better to have something in hand to troubleshoot, instead of randomly looking for something.
- Enable JS,CSS Compression:
- This helps in boosting the performance of application, by reducing page request to server or browsing the pages.
- We can make use of static and dynamic content compression in IIS.
- Sitecore Debugging:
- We should make use of Sitecore debugger tool which can be found in Page editor, this gives a very good understanding and statistics around different components being used in the page.
- Helps in understanding which specific component(sublayout/rendering) takes how much time to render on the page.
- One of the early troubleshooting which every developer should start doing right from the time we start experiencing performance issue in local development environment.
- This tools helps in narrowing down the problem with code,and thus helps in putting all our energy and time in right spot.
- Sitecore Schedule tasks:
- Always try to review the Sitecore schedule tasks, and see if there is any task which is running and which is not expected?
- Make sure to review all the agents which is present under <agents> section, in web.config or using custom patch(if used).
- Another thing to note, we should also consider updating the frequency of that task execution by updating the time,if schedule task is not required we should disable it.
- See if the schedule task is triggering site full publish, this can be a serious issue in production environment,as this can clear all cache which can slow down the site.
- Keep close watch on the logs for anything related to schedules tasks.
- Indexing Strategy:
- Revisit the indexing strategy which is being used in the application, see if the full index rebuild is in place for any item publish event.
- Try to update the strategy if it’s not as per the requirement, or if it’s over killing.
- Please review this document for anything related to available indexing strategy- https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/indexing/index_update_strategies
- Image optimization:
- I have seen this issue with several applications, just because the images are not properly optimized, they end up taking more resource bandwidth and resulting poor user experience.
- Remember, this is the time of mobile, and any poor performing mobile site can be a serious issue to client.
- We should always train and educate our client and content authors to make use of optimized images, and trust me they will listen to you.
- This is one of the critical and important part of any Sitecore application, try to use indexes as much as possible when it comes to fetching details from the repository or searching of the items based on specific condition and filters.
- Try to perform all the operation directly in the query like:
- Avoid fetching all the results and then applying business rules to filter it based on specific condition, as I mentioned try to do most of the processing directly in query level.
- I had seen issues in application which was not performing well, just because of not making true use of indexes,review you index definition and configuration,and see if it has everything which is expected for it.
- Try to use create and use custom indexes for any custom feature, it’s always better to have one.
- Use of computed fields can be considered, this helps in executing any complex business logic while querying the results.
- Site publish:
- We should not trigger complete site publish in production environment,unless and until it’s very much required, this can be a costly operation, as this clears all the cache.
- Try to publish only areas which are required, we can trigger full site publish in development environment, but should be done carefully in production.
- Use Smart or Incremental Publish.
- Configure sublayout(s) and rendering(s) to use caching, this can give a real good browsing experience to site users.
- Clearing cache is something which should be considered in production environment, when trying to publish items this will clear the cache and can slow down the application performance.
- Use of GetDescendants is one of the costliest operation we can think off, we should always try using indexes or fast queries if possible and required.
- Revisit your code and search if there is any reference to GetDescendants, and update it if required.
- No of Items under one node:
- Try not to have more items under single node/item, and break it down using several sub folders or items.
- This helps in giving good content editor experience.
- make use of item buckets wherever applicable.
Few important things to follow:
- Write good code.
- Proper unit testing.
- Get your code reviewed.
- Follow best practices.
This helps in fixing some of the issues before it goes to QA.
Please also refer Sitecore recommendation for performance optimization : https://sdn.sitecore.net/Articles/Administration/Sitecore%20Performance/Optimizing%20Sitecore%206%20and%20later/Optimizing%20Performance%20in%20Sitecore.aspx
I hope this helps someone in troubleshooting Sitecore performance issues, please let me know if you have any questions or comments, happy to discuss.
Happy learning 🙂