Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Website performance View modes: 
User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 1/21/2014 9:30:46 PM
   
Website performance
Hi All,

We are trying to optimize our website performance to improve page-speed.

There are few issues we are running into which are frequently reported by google pagespeed and YSLow. First of all how much importance one should put on these tools.

Major issues.

1. CSS Minification Since we are inherting foundation CSS in our main CSS through macros, some problem in it not allowing css minification to happen. I already have one thread going for this http://devnet.kentico.com/Forums/f65/t43316/Foundation-css-file.aspx

2. JS minification - We have enabled both CSS and JS minification, however browser still says our JS is not minified. Ofcourse it's not happening!!

3. CSS/JS compression - We have done all recommended settings given on this link http://devnet.kentico.com/docs/7_0/devguide/index.html?code_minification_and_compression.htm. However we are still getting suggestions that content should be sent gzip to improve performance. Any kentico issue here?

4. Best approach to serve large no of images?

Any other performance tip is welcome.

Thanks,
Chetan

User avatar
Member
Member
DahlinDev - 1/21/2014 10:02:29 PM
   
RE:Website performance
2. How are you referencing your css and js files? You need to make sure to reference them such as:

For JS -
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fcustom%2fjqModal.js"></script>

For CSS -

if stylesheet is in General tab
<link href="/CMSPages/GetResource.ashx?stylesheetname=CoorporateSite" type="text/css" rel="stylesheet"/> 

if stylesheet is in Theme tab
<link href="/ourworldtours/CMSPages/GetResource.ashx?stylesheetfile=/ourworldtours/App_Themes/CoorporateSite/css/jqModal.css" type="text/css" rel="stylesheet" />

or simply have your "Site" in the SiteManger using your Site CSS Stylesheet. That will generate the stylesheet references for you.

4. Are you saving your files to disk? By default Kentico saves them in SQL.

Output Caching is always very helpful, just make sure you are aware of it. It can be a pain when wanting to update the site.

I like to setup a ping for the site to keep the site in a ready state so it doesn't "go to sleep" and require a compile on the next request.

User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 1/21/2014 10:49:16 PM
   
RE:Website performance
CSS - We are referencing CSS through site manager. CSS are attached to their respective page templates.

JS - Apart from one core JS which we are referencing in master template, we are dynamically loading all JS as per page. Mainly done as we have fully responsive website.

Files - In settings it's checked for both File system and Database. Should I uncheck database?

How can I do this ? "I like to setup a ping for the site to keep the site in a ready state so it doesn't "go to sleep" and require a compile on the next request."

Thanks
Chetan

User avatar
Member
Member
DahlinDev - 1/23/2014 3:03:59 PM
   
RE:Website performance
JS - When you say you are dynamically loading it, it is loading an external file? Are you referencing that file as I suggested above?

Files - I always uncheck database

Ping - I have a service in Rackspace I use that allows me to setup http pings. If you have the site hosted in Azure website, it also has a "Always On" feature. http://weblogs.asp.net/scottgu/archive/2014/01/16/windows-azure-staging-publishing-support-for-web-sites-monitoring-improvements-hyper-v-recovery-manager-ga-and-pci-compliance.aspx
Otherwise you just have to find a way to send a request to your sites url about every 10 minutes.

User avatar
Certified Developer 12
Certified Developer 12
chetan2309-gmail - 1/23/2014 9:26:11 PM
   
RE:Website performance
Yes, I am referencing it now the way you have suggested. It has helped. Now we are serving minified files. Thanks!!

Does it help to uncheck database from performance perspective and how?

Thanks,
Chetan


User avatar
Member
Member
DahlinDev - 1/27/2014 11:28:43 PM
   
RE:Website performance
Here is a good blog post on the settings of storing files on disk and in database:

http://devnet.kentico.com/Blogs/Martin-Hejtmanek/December-2009/Optimization-tip--Speed-up-your-images-and-files.aspx