Performance Mistakes In Kentico 7/18/2012Miro Remias, Solution Architect.

Slides:



Advertisements
Similar presentations
WordPress from Start to Finish Day 1: Installing and Using WordPress Looking at the WordPress database.
Advertisements

2/25/2013 Miro Remias, Solution Architect
Using the Self Service BMC Helpdesk
Business Development Suit Presented by Thomas Mathews.
Blogging at Memorial University Libraries The what, the why, the how, the who.
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
Caching and caching dependencies explained in Kentico CMS
Kentico CMS 5.5 R2 What’s New. Highlights Intranet Solution Document management package – WebDAV support – Project & task management – Document libraries.
Maxim Zhvirblya EPAM Systems © 2013 Or make MSSQL breathe easily RBS and Blob Cache in SharePoint 2013.
Turners SharePoint Web Site How we did it. 2 Page Anatomy Custom Search Web Part Custom Search Web Part Data Form Web Parts Content Query Web Part HTML.
Objectives Moodle is an online learning environment where instructors & their students interact. In this workshop you will learn: 1.Configure system requirements.
1 Chapter 12 Working With Access 2000 on the Internet.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Microsoft ® Official Course Developing Optimized Internet Sites Microsoft SharePoint 2013 SharePoint Practice.
Transformations Revealed
Kentico CMS 5.0 Full-featured Flexible Web Content Management System for All Your Needs.
Capacity Planning in SharePoint Capacity Planning Process of evaluating a technology … Deciding … Hardware … Variety of Ways Different Services.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Development In Kentico 7
OM. Brad Gall Senior Consultant
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Facebook Like Solution in SharePoint Using JavaScript Amie Seisay
Real World Examples – Part II 7/26/2013Miro Remias, Sr. Solution Architect.
Connect Learn Share Performance Optimization for Microsoft Dynamics CRM Presented by: Walter Grow Austin Jones.
Building Highly Scalable Websites Karol Jarkovsky Sr. Solution Architect
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Session 10: Managing State. Overview State Management Types of State Management Server-Side State Management Client-Side State Management The Global.asax.
State Management. What is State management Why State management ViewState QueryString Cookies.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Forensic Drupal Debugging Dan Harris daneesia on drupal.org.
Module 10 Administering and Configuring SharePoint Search.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
ASP.NET OPTIMIZATION. Why Optimize? $$$ Whether you build applications for customers or not, enhanced applications save money.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
Office Business Applications Workshop Defining Business Process and Workflows.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
ESRI User Conference 2004 ArcSDE. Some Nuggets Setup Performance Distribution Geodatabase History.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Asia Pacific SharePoint Conference 2007 May 15th to 16th, 2007 Hilton Hotel Sydney.
Michael Hofer Senior Consultant Microsoft Corporation.
1 © Xchanging 2010 no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging. MOSS Training – UI customization.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Web Content Management with MOSS 2007 Patrick Tisseghem
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
VERSION 12.5 HIHGLIGHTS Lead Developer - Rob Nikkel.
TOP 10 Thinks you shouldn’t do with/in your database
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Databases Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – SharePoint Database.
Developer Exam Preparation Thom Robbins Bryan Soltis
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
Using the Kentico CMS API Thom Robbins Bryan Soltis
Leveraging SharePoint Search In SharePoint 2013 Jameson Bozeman.
Kentico CMS Performance Optimization Implementation at Newsmax - Ayush Chaturvedi.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Enhance Your Page Load Speed And Improve Traffic.
Performance optimization and caching in Kentico CMS Martin Hejtmanek (CTO), Webinar 9/16/2009.
SharePoint 2010 Performance and Capacity Planning Best Practices
Managing State Chapter 13.
Cms Full-featured Flexible Web Content Management System for All Your Needs.
SharePoint Site Admin Training
PHP / MySQL Introduction
ASP.NET 4.0 State Management Improvements – Deep Dive
Presentation transcript:

Performance Mistakes In Kentico 7/18/2012Miro Remias, Solution Architect

My Kentico Is Really “SLOW”! Why? Questions Is it because Kentico itself is slow? Performance report of 6.0 Performance report Is it because I’m not using it properly? What are the best practices? What should I change in settings to make it fast? … Some facts The best performing web sites are static (.html), Which is the fastest? BLANK html page without any code! - our baseline to compare with, Every functionality/feature comes with cost of extra processing, Find balance between usability of the system, used features and performance, Laziness and comfort cost us money, Investigate, debug, learn from mistakes, understand how the system works …, There is always better (performance) solution, Confirm your ideas (Support, Consulting, your colleagues etc.), What can go wrong will go wrong, Always prepare for worst case scenario,

Where To Start Optimizing? Eliminate/reduce the communication between client and server, Locate code (JavaScript/CSS) into external files, so that the same code is not transferred over and over, but instead it is cached on the client side, [SIZE OF THE HTML CODE] Enable client cache for all possible resources,client cache Eliminate cookies, because they are sent from the client to the server with each request, Reorganize the resources on the page to improve visual performance, Reorganize the resources Disable ViewState,ViewState Use code minification & compression,minification & compression Eliminate the round trips (redirects), Reduce data transfer and frequency retrieval between database and web server, Optimize all SQL queries [COLUMNS, TOP N, JOINS ETC.], Cache data on server side, Cache data Review the usage of Kentico API and custom code, Minimize number of objects allocated in memory, Work with low-level objects - DataRow vs TreeNode, Eliminate all exceptions logged in the Event log,Event log Reuse existing objects/data, Reuse existing objects/data Eliminate resource consuming and intensive operations, Disable scheduled tasks which are not used or run them as external services, Disable scheduled tasksexternal services Increase execution interval of scheduled tasks,execution interval Disable output filter and write better code,output filter Disable features/functionality which you are not using, Think about the best storage for your files, DB vs. File system, DB vs. File system Content Tree vs. Media library, Content TreeMedia library Review your environment setup, Scaling out vs. scaling up your hardware, Scaling out vs. scaling up Optimize SQL server and IIS settings, Cache output on IIS level, Cache output

Example 1 – Redirects, Design Assets Empty Page in content tree  SQL queries: 29!  Round trips (client/server): 18! Solution  Provide design assets from FS App_Themes, Media Library etc.,Media Library Images in content tree Only in case you need: workflow, permissions, extra document alias etc.  Eliminate round trips, Use exact/lower/upper case URLs, Reference them the way you need, Provide/generate direct links,

Kentico Client Images – Client/Server Communication I want the stylesheet HTML of page Here is the stylesheet /page.aspx GET /Images/Topmenu_bg.png SQL Redirected to /images/topmenu_bg.png GET /images/topmenu_bg.png Redirected to /files/ae/ae162e86-0a39-4f84-809e-2daadcde3339.png SQL GET /files/ae/ae162e86-0a39-4f84-809e-2daadcde3339.png Here is the file GET /images/topmenu_bg.png Here it isNO SQL MEDIA LIBRARY / App_Themes CLIENT CACHE

Example 2 – ViewState, Columns, Pager, Loops News list page in content tree (5k documents)  SQL queries: 110! (more than 4.1 MB of data)  Round trips (client/server): 52! Solution  Disable ViewState (web part/zone level),  Could increase size of the HTML code rapidly, Think about size of vs. layout,  Use short Control IDs,  Use “Web part title” as human readable identifier for editors,  Utilize Columns property (the same on API level),  Use only needed columns (e.g.: based on transformation code),  Be aware of DocumentContent column and its size (CMS_Document table),  Content tree is complex structure – up to 4 tables (CMS_Tree, CMS_Document, DOCTYPE, COM_SKU),  Select data at once rather than for each item separately,  Be creative - use custom approach rather than standard “Repeater”,  Define default image  Don’t store the default image for each document separately!  Provide direct URL (FS) to such image in case main image is missing,  Transformation function – IfEmpty etc.,  Get familiar with Pager - How it works in case I have 5K documents?  Use different solution (Filter, Content Tree hierarchy/structure etc.)

Example 2 – Smart Search Index Processing Smart Search module Smart Search  Can index  Documents (ad-hoc forums, blog comments, message boards, Crawler),  Index contains also some portion of page template  Web parts (contentbefore, contentafter, text etc.)  Forums, Users, Custom Tables, Any object (Avatar, Customer etc.), News list page in content tree (5k documents)  Operation: Update of one (global/re-usable) page template,  SQL queries: 5k * (up to 10) = 50k Solution  Get familiar with Smart Search module – how it works, Webinar - Smart Search In Kentico 6.0,Smart Search In Kentico 6.0 Suitable for searching over large amount of records (200k+),  Disable CMSCreateTemplateSearchTasks web.config key, CMSCreateTemplateSearchTasks (true)- Any changes made to a page template will automatically trigger an update of all documents that are based on the given template in the appropriate smart search indexes.

Example 3 – Pages Outside Of Content Tree ASPX page with NO CONTENT and NO CODE  SQL queries: 12! Solution  Setting: URLs and SEO -> Excluded URLs  Default excluded locations /app_ /testingpages/ /cmshelp/ /cmsscripts/ /cmssitemanager/ /cmsmodules/ /cmstemplates/ /cmsformcontrols/ /cmsinlinecontrols/ /cmsadmincontrols/ /cmsmessages/ /cmswebparts/ /cmstemplatelayouts/ /cmslayouts/ /cmstransformations/ /cmssiteutils/ /cmsresources/ /cmsinstall/ /cmscontrolsexamples/ /cmsapiexamples/ PageInfo (CMS.PortalEngine) General document info, Content of editable regions, Web part settings and template structure etc. Selected based on 1.Alias path 2.Wildcard URLWildcard 3.Document aliasDocument alias Make sure that it is cached! Settings -> System -> Performance -> Cache page info (minutes) Use CMSContext.CurrentPageInfo Cached General document fields CMSContext.CurrentDocument Not cached Document type fields

Example 4 – Random Items (No Cache) Page listing 3 random documents from the content tree  SQL queries: 38! Solution  Universal viewer with custom query,  Repeater with custom query,  If separation is needed Query data source + Basic listing web part(s) Custom Data source web part with caching o Webinar: Data Source And Filter Controls in Kentico CMS,Data Source And Filter Controls in Kentico CMS o Blog post: Caching – Deep Dive,Caching – Deep Dive

Example 5 – Full (Output) Cache Based on  URL (/Home.aspx, /MyHomeAlias.aspx, /Home.aspx?myparam=value1)  username, sitename, lang, browser web.config key: CMSOutputCacheItems Flushed when POSTBACK occurs on a page (partial cache as well)  For all variants of the full page cache on the page e.g.: IE7, IE8, Firefox 13, Admin user, Public user, ?campaign=my, etc. Solution?  web.config key: Flush the cache on your own for specific pages CMS.GlobalHelper.CacheHelper.ClearOutputCache() Full page cache on FS Persistent cache with different cache minutes setting. t (min) 14 5 Created Needed / Loaded from FS 0 Expired

Example 6 – Using Kentico API Incorrectly Kentico API  Use the API wisely (not everywhere),  Verify how the system (CMS) behaves, Application_BeginRequest Application_AuthenticateRequest (NO Session) Application_AuthorizeRequest Application_ResolveRequestCache Application_AcquireRequestState (Session) Application_PreRequestHandlerExecute Application_PreSendRequestHeaders Application_PreSendRequestContent Application_PostRequestHandlerExecute Application_ReleaseRequestState Application_UpdateRequestCache Application_EndRequest CurrentUser GET Request/Session GET Database (SQL) [in your case 3x SQL query for each request] SET Request/Session … Request Application Request Life Cycle

Questions ? Performance & Health AuditPerformance & Health Audit (Consulting Package)

Contact Miro Remias consulting: