SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
Make Your Site SpEEdy
Improving the performance of
your ExpressionEngine website




                            Prepared by Ruthie BenDor for the
                          BostonEErs September 2010 Meetup
Part I: Tools and techniques for

Measuring Performance
What impacts site speed?

1. Browser rendering time               4. Filesystem disk accessing time
2. Component transmission time          5. Database query execution time
3. Server-side script execution



                                                               1
                      3                            2

 5                        Server-side                     Browser
Database                    scripts

                          Filesystem
                     4

                                  Web server
What impacts site speed?

1. Browser rendering time               4. Filesystem disk accessing time
2. Component transmission time          5. Database query execution time
3. Server-side script execution



                                                                  1
                      3                              2

5                         Expression                           Browser
                                                    HTML
MySQL                       Engine               fragments,
                                                  CSS files,
                                                 Javascript
                                                files, images


                          Filesystem
                     4

                                  Web server
1      2


Page render time and component load time

can be measured with YSlow and/or Google Page Speed for Firebug.
                                             (Also useful: Webkit’s
                                             Developer Tools.)
3


Server-side script execution

can be measured by enabling EE’s Template Debugging.


                            In EE 1.6.x’s Control Panel:
          Admin › System Preferences › Output and Debugging Preferences




                             In EE 2.1’s Control Panel:
               Admin › System Administration › Output and Debugging
5


Database queries

can be seen by enabling EE’s output profiler. Note that this doesn’t tell us
how long a single query takes to run, but it does show us the full query.

                              In EE 1.6.x’s Control Panel:
            Admin › System Preferences › Output and Debugging Preferences




                               In EE 2.1’s Control Panel:
                 Admin › System Administration › Output and Debugging
Part 2: Recommendations for

Improving Performance
The site optimization cycle




     Measure
   performance.
  (“Benchmark.”)     Identify the
                     biggest (or
                    easiest-to-fix)
                     bottleneck.
                                     Remove that
                                      bottleneck.
What impacts site speed?

1. Browser rendering time               4. Filesystem disk accessing time
2. Component transmission time          5. Database query execution time
3. Server-side script execution



                                                                  1
                      3                              2

5                         Expression                           Browser
                                                    HTML
MySQL                       Engine               fragments,
                                                  CSS files,
                                                 Javascript
                                                files, images


                          Filesystem
                     4

                                  Web server
1


Browser rendering time optimizations

• Make your Javascript and CSS more efficient, so the browser
  is able to render (draw) the completed page more quickly.
  • For writing faster CSS, check out OOCSS:
     http://wiki.github.com/stubbornella/oocss/
  • For writing faster JavaScript, speed-test snippets using JSPerf:
     http://jsperf.com/
2


Component transmission time optimizations

• Minify and concatenate all JavaScript into a single file, and
  minify and concatenate all CSS into a single file.
  • If you keep your Javascript and CSS in EE templates, concatenate these
    assets using this technique: http://easy-reader.net/archives/2010/07/11/
    template-based-asset-munging-in-expressionengine
  • To concatenate and minify JS/CSS in EE templates, try SL Combinator
    http://experienceinternet.co.uk/software/sl-combinator/docs/, which uses
    an old version of Minify http://code.google.com/p/minify/
  • If you keep your JS and CSS assets outside of EE, use Minify http://
    code.google.com/p/minify/
2


Component transmission time optimizations (con’t)

• Serve optimized images.
  • Prevent content maintainers from uploading content images that are too
    large by using http://www.lumis.com/page/imgsizer/
  • Run all site image assets through http://smush.it/ to reduce filesize as
    much as possible.
  • Where possible, combine (aka sprite) site image assets.

• Enable GZIP compression in EE.
     In EE 1.6.x’s Control Panel:
     Admin › System Preferences ›         In EE 2.1’s Control Panel:
     Output and Debugging Preferences     Admin › System Administration › Output and Debugging
3


Server-side script execution optimizations

• Cache individual tags.
  • Tag caches are time-based, set in minutes. Use on any EE tag like so:
    {exp:some:tag cache="yes" refresh="30"}

• Cache entire templates.
  • Enabled on a per-template basis. In EE1, look in Templates > Preferences. In EE2,
    look in Design > Templates > Template Preferences.
  • Template caches are time-based, mostly - certain events will clear the cache:
     http://expressionengine.com/user_guide/general/caching.html#template_caching

  • Template caching supercedes tag caching, so if you’re caching the entire
    template, there’s no reason to also cache individual tags.
  • A cached template in EE is still heavier, performance-wise, than a 100% static
    page served from outside EE.
3


Server-side script execution optimizations (con’t)

• Where possible, use Global Variables and Snippets instead of
  embedded templates.
  • Snippets can contain EE tags, while Global Variables can contain only HTML.
  • Snippets are EE2-only.
  • Why Snippets are faster than embedded templates:
    http://www.meetup.com/BostonEErs/messages/boards/thread/9783637

• Where possible, avoid nesting embedded templates.
4


Filesystem optimizations

• Don’t save templates as flat files.
  • Why? “Saving templates as files can marginally increase disk 1/o as teach
    template must be retrieved from disk in addition to the standard database
    query responsible for managing your template’s meta data (access, PHP
    parsing, template type, etc.)” - http://expressionengine.com/user_guide/
    general/handling_extreme_traffic.html

• But flat files are really convenient during development!
  • Suggestion: work with templates as flat files during development. At site
    launch, sync all templates back to the database, and set all templates to
    no longer save as flat files. How?
     • In EE2, use the built-in Synchronize Templates tool under Design >
       Templates.
     • In EE1, either sync manually, or use the free DC Template Manager
       module: http://devot-ee.com/add-ons/dc-template-manager/
5


Database query optimizations

• Set the database connection to non-persistent.
  • In EE2, set Persistent Database Connection to No at
    Admin › System Administration › Database Settings
  • In EE1, set Database Connection Type to Non Persistent at
    Admin › System Preferences › Database Settings

• Reduce the number of queries each page calls.
  • http://expressionengine.com/wiki/Reduce_Queries/

• Cache frequently used queries.
  • In EE2, set Enable SQL Query Caching to Yes at
    Admin › System Administration › Database Settings
  • In EE1, set Enable SQL Query Caching to Yes at
    Admin › System Preferences › Database Settings
5


Database query optimizations (con’t)

• Enable dynamic channel query caching.
  • Only enable if your site doesn’t use future, expiring, or random entries.
  • In EE1, set Cache Dynamic Channel Queries? to Yes at
    Admin › Weblog Administration › Global Weblog Preferences.
  • In EE2, set Cache Dynamic Channel Queries? to Yes at
    Admin › Channel Administration › Global Preferences.

• Disable unused parts of {exp:channel:entries} queries.
  • In EE1, six things can be disabled: {exp:channel:entries disable="categories|
    category_fields|custom_fields|member_data|pagination|trackbacks"}
  • In EE2, trackbacks have been removed, so five things can be disabled:
    {exp:channel:entries disable="categories|category_fields|custom_fields|
    member_data|pagination"}
5


Database query optimizations (con’t)

• Repair and optimize EE’s MySQL tables.
  • In EE1, look under Admin › Utilities › SQL Manager › Manage Database Tables.
  • In EE2, look under Tools › Data › SQL Manager › Manage Database Tables.

• Disable template tracking.
  • In EE1, look under Admin › System Preferences › Tracking Preferences.
  • In EE2, these options must be set manually in config.php.
Part 3:

More Resources
Online Resources

• ExpressionEngine.com User Guide
  • http://expressionengine.com/user_guide/general/caching.html
  • http://expressionengine.com/user_guide/general/
    handling_extreme_traffic.html
  • http://expressionengine.com/user_guide/templates/flat_file_templates.html
  • http://expressionengine.com/legacy_docs/cp/admin/system_preferences/
    tracking_preferences.html


• SolSpace’s EE Website Performance Guidelines
  • http://www2.grist.org/misc/Performance_Guidelines.pdf
Books

• High Performance Web Sites, by Steve Souders:
 http://www.amazon.com/gp/product/0596529309

• Even Faster Web Sites, also by Steve Souders:
 http://www.amazon.com/gp/product/0596522304
Nearby Groups

• Boston Web Performance Group:
  http://www.meetup.com/Web-Performance-Boston/
Thanks!

http://twitter.com/BostonEErs

http://BostonEErs.org

Mais conteúdo relacionado

Mais procurados

JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingAlexandre Cavalcanti
 
Weblogic Administration Managed Server migration
Weblogic Administration Managed Server migrationWeblogic Administration Managed Server migration
Weblogic Administration Managed Server migrationRakesh Gujjarlapudi
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.Dimitris Andreadis
 
Building the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South AmericaBuilding the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South AmericaMichael Noel
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedInYevgeniy Brikman
 
Was liberty at scale
Was liberty at scaleWas liberty at scale
Was liberty at scalesflynn073
 
Webcenter application performance tuning guide
Webcenter application performance tuning guideWebcenter application performance tuning guide
Webcenter application performance tuning guideVinay Kumar
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSRakesh Gujjarlapudi
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsJames Bayer
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Serveracosdt
 
JBoss at Work: Using JBoss AS 6
JBoss at Work: Using JBoss AS 6JBoss at Work: Using JBoss AS 6
JBoss at Work: Using JBoss AS 6Saltmarch Media
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningMichel Schildmeijer
 
Case Study with Answers.com on Scaling with Memcached and MySQL
Case Study with Answers.com on Scaling with Memcached and MySQLCase Study with Answers.com on Scaling with Memcached and MySQL
Case Study with Answers.com on Scaling with Memcached and MySQLanswers
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOpsFrank Munz
 

Mais procurados (20)

JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 Troubleshooting
 
Weblogic Administration Managed Server migration
Weblogic Administration Managed Server migrationWeblogic Administration Managed Server migration
Weblogic Administration Managed Server migration
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
 
Building the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South AmericaBuilding the Perfect SharePoint 2010 Farm - Sharing the Point South America
Building the Perfect SharePoint 2010 Farm - Sharing the Point South America
 
JBOSS Training
JBOSS Training JBOSS Training
JBOSS Training
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedIn
 
Was liberty at scale
Was liberty at scaleWas liberty at scale
Was liberty at scale
 
Webcenter application performance tuning guide
Webcenter application performance tuning guideWebcenter application performance tuning guide
Webcenter application performance tuning guide
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPS
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
Weblogic12 c installation guide
Weblogic12 c installation guideWeblogic12 c installation guide
Weblogic12 c installation guide
 
JBoss at Work: Using JBoss AS 6
JBoss at Work: Using JBoss AS 6JBoss at Work: Using JBoss AS 6
JBoss at Work: Using JBoss AS 6
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
Case Study with Answers.com on Scaling with Memcached and MySQL
Case Study with Answers.com on Scaling with Memcached and MySQLCase Study with Answers.com on Scaling with Memcached and MySQL
Case Study with Answers.com on Scaling with Memcached and MySQL
 
JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6
 
Test
TestTest
Test
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOps
 

Semelhante a Speed Up Your EE Site

Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesUlrich Krause
 
Analysis of Google Page Speed Insight
Analysis of Google Page Speed InsightAnalysis of Google Page Speed Insight
Analysis of Google Page Speed InsightSarvesh Sonawane
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowSpiffy
 
Extjs3.4 Migration Notes
Extjs3.4 Migration NotesExtjs3.4 Migration Notes
Extjs3.4 Migration NotesSimoAmi
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702Jess Coburn
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPagesUlrich Krause
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Hyungwook Lee
 
Sharepoint Performance - part 2
Sharepoint Performance - part 2Sharepoint Performance - part 2
Sharepoint Performance - part 2Regroove
 
Real-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesReal-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesa2tt
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8David Chou
 
SPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastSPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!Ulrich Krause
 

Semelhante a Speed Up Your EE Site (20)

Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPages
 
Analysis of Google Page Speed Insight
Analysis of Google Page Speed InsightAnalysis of Google Page Speed Insight
Analysis of Google Page Speed Insight
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
 
Extjs3.4 Migration Notes
Extjs3.4 Migration NotesExtjs3.4 Migration Notes
Extjs3.4 Migration Notes
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)
 
Sharepoint Performance - part 2
Sharepoint Performance - part 2Sharepoint Performance - part 2
Sharepoint Performance - part 2
 
Real-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesReal-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classes
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
 
SPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastSPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint Beast
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!
 

Mais de Ruthie BenDor

Even Naming This Talk Is Hard
Even Naming This Talk Is HardEven Naming This Talk Is Hard
Even Naming This Talk Is HardRuthie BenDor
 
Move Fast And Document Things
Move Fast And Document ThingsMove Fast And Document Things
Move Fast And Document ThingsRuthie BenDor
 
Build Your First EE2 Site
Build Your First EE2 SiteBuild Your First EE2 Site
Build Your First EE2 SiteRuthie BenDor
 
Add-On Migration Planner for EE 1.x to EE 2.x
Add-On Migration Planner for EE 1.x to EE 2.xAdd-On Migration Planner for EE 1.x to EE 2.x
Add-On Migration Planner for EE 1.x to EE 2.xRuthie BenDor
 
All About ExpressionEngine 2
All About ExpressionEngine 2All About ExpressionEngine 2
All About ExpressionEngine 2Ruthie BenDor
 
Content Management for the little guy
Content Management for the little guyContent Management for the little guy
Content Management for the little guyRuthie BenDor
 

Mais de Ruthie BenDor (7)

Even Naming This Talk Is Hard
Even Naming This Talk Is HardEven Naming This Talk Is Hard
Even Naming This Talk Is Hard
 
Move Fast And Document Things
Move Fast And Document ThingsMove Fast And Document Things
Move Fast And Document Things
 
VersionEEring
VersionEEringVersionEEring
VersionEEring
 
Build Your First EE2 Site
Build Your First EE2 SiteBuild Your First EE2 Site
Build Your First EE2 Site
 
Add-On Migration Planner for EE 1.x to EE 2.x
Add-On Migration Planner for EE 1.x to EE 2.xAdd-On Migration Planner for EE 1.x to EE 2.x
Add-On Migration Planner for EE 1.x to EE 2.x
 
All About ExpressionEngine 2
All About ExpressionEngine 2All About ExpressionEngine 2
All About ExpressionEngine 2
 
Content Management for the little guy
Content Management for the little guyContent Management for the little guy
Content Management for the little guy
 

Último

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Último (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

Speed Up Your EE Site

  • 1. Make Your Site SpEEdy Improving the performance of your ExpressionEngine website Prepared by Ruthie BenDor for the BostonEErs September 2010 Meetup
  • 2. Part I: Tools and techniques for Measuring Performance
  • 3. What impacts site speed? 1. Browser rendering time 4. Filesystem disk accessing time 2. Component transmission time 5. Database query execution time 3. Server-side script execution 1 3 2 5 Server-side Browser Database scripts Filesystem 4 Web server
  • 4. What impacts site speed? 1. Browser rendering time 4. Filesystem disk accessing time 2. Component transmission time 5. Database query execution time 3. Server-side script execution 1 3 2 5 Expression Browser HTML MySQL Engine fragments, CSS files, Javascript files, images Filesystem 4 Web server
  • 5. 1 2 Page render time and component load time can be measured with YSlow and/or Google Page Speed for Firebug. (Also useful: Webkit’s Developer Tools.)
  • 6. 3 Server-side script execution can be measured by enabling EE’s Template Debugging. In EE 1.6.x’s Control Panel: Admin › System Preferences › Output and Debugging Preferences In EE 2.1’s Control Panel: Admin › System Administration › Output and Debugging
  • 7. 5 Database queries can be seen by enabling EE’s output profiler. Note that this doesn’t tell us how long a single query takes to run, but it does show us the full query. In EE 1.6.x’s Control Panel: Admin › System Preferences › Output and Debugging Preferences In EE 2.1’s Control Panel: Admin › System Administration › Output and Debugging
  • 8. Part 2: Recommendations for Improving Performance
  • 9. The site optimization cycle Measure performance. (“Benchmark.”) Identify the biggest (or easiest-to-fix) bottleneck. Remove that bottleneck.
  • 10. What impacts site speed? 1. Browser rendering time 4. Filesystem disk accessing time 2. Component transmission time 5. Database query execution time 3. Server-side script execution 1 3 2 5 Expression Browser HTML MySQL Engine fragments, CSS files, Javascript files, images Filesystem 4 Web server
  • 11. 1 Browser rendering time optimizations • Make your Javascript and CSS more efficient, so the browser is able to render (draw) the completed page more quickly. • For writing faster CSS, check out OOCSS: http://wiki.github.com/stubbornella/oocss/ • For writing faster JavaScript, speed-test snippets using JSPerf: http://jsperf.com/
  • 12. 2 Component transmission time optimizations • Minify and concatenate all JavaScript into a single file, and minify and concatenate all CSS into a single file. • If you keep your Javascript and CSS in EE templates, concatenate these assets using this technique: http://easy-reader.net/archives/2010/07/11/ template-based-asset-munging-in-expressionengine • To concatenate and minify JS/CSS in EE templates, try SL Combinator http://experienceinternet.co.uk/software/sl-combinator/docs/, which uses an old version of Minify http://code.google.com/p/minify/ • If you keep your JS and CSS assets outside of EE, use Minify http:// code.google.com/p/minify/
  • 13. 2 Component transmission time optimizations (con’t) • Serve optimized images. • Prevent content maintainers from uploading content images that are too large by using http://www.lumis.com/page/imgsizer/ • Run all site image assets through http://smush.it/ to reduce filesize as much as possible. • Where possible, combine (aka sprite) site image assets. • Enable GZIP compression in EE. In EE 1.6.x’s Control Panel: Admin › System Preferences › In EE 2.1’s Control Panel: Output and Debugging Preferences Admin › System Administration › Output and Debugging
  • 14. 3 Server-side script execution optimizations • Cache individual tags. • Tag caches are time-based, set in minutes. Use on any EE tag like so: {exp:some:tag cache="yes" refresh="30"} • Cache entire templates. • Enabled on a per-template basis. In EE1, look in Templates > Preferences. In EE2, look in Design > Templates > Template Preferences. • Template caches are time-based, mostly - certain events will clear the cache: http://expressionengine.com/user_guide/general/caching.html#template_caching • Template caching supercedes tag caching, so if you’re caching the entire template, there’s no reason to also cache individual tags. • A cached template in EE is still heavier, performance-wise, than a 100% static page served from outside EE.
  • 15. 3 Server-side script execution optimizations (con’t) • Where possible, use Global Variables and Snippets instead of embedded templates. • Snippets can contain EE tags, while Global Variables can contain only HTML. • Snippets are EE2-only. • Why Snippets are faster than embedded templates: http://www.meetup.com/BostonEErs/messages/boards/thread/9783637 • Where possible, avoid nesting embedded templates.
  • 16. 4 Filesystem optimizations • Don’t save templates as flat files. • Why? “Saving templates as files can marginally increase disk 1/o as teach template must be retrieved from disk in addition to the standard database query responsible for managing your template’s meta data (access, PHP parsing, template type, etc.)” - http://expressionengine.com/user_guide/ general/handling_extreme_traffic.html • But flat files are really convenient during development! • Suggestion: work with templates as flat files during development. At site launch, sync all templates back to the database, and set all templates to no longer save as flat files. How? • In EE2, use the built-in Synchronize Templates tool under Design > Templates. • In EE1, either sync manually, or use the free DC Template Manager module: http://devot-ee.com/add-ons/dc-template-manager/
  • 17. 5 Database query optimizations • Set the database connection to non-persistent. • In EE2, set Persistent Database Connection to No at Admin › System Administration › Database Settings • In EE1, set Database Connection Type to Non Persistent at Admin › System Preferences › Database Settings • Reduce the number of queries each page calls. • http://expressionengine.com/wiki/Reduce_Queries/ • Cache frequently used queries. • In EE2, set Enable SQL Query Caching to Yes at Admin › System Administration › Database Settings • In EE1, set Enable SQL Query Caching to Yes at Admin › System Preferences › Database Settings
  • 18. 5 Database query optimizations (con’t) • Enable dynamic channel query caching. • Only enable if your site doesn’t use future, expiring, or random entries. • In EE1, set Cache Dynamic Channel Queries? to Yes at Admin › Weblog Administration › Global Weblog Preferences. • In EE2, set Cache Dynamic Channel Queries? to Yes at Admin › Channel Administration › Global Preferences. • Disable unused parts of {exp:channel:entries} queries. • In EE1, six things can be disabled: {exp:channel:entries disable="categories| category_fields|custom_fields|member_data|pagination|trackbacks"} • In EE2, trackbacks have been removed, so five things can be disabled: {exp:channel:entries disable="categories|category_fields|custom_fields| member_data|pagination"}
  • 19. 5 Database query optimizations (con’t) • Repair and optimize EE’s MySQL tables. • In EE1, look under Admin › Utilities › SQL Manager › Manage Database Tables. • In EE2, look under Tools › Data › SQL Manager › Manage Database Tables. • Disable template tracking. • In EE1, look under Admin › System Preferences › Tracking Preferences. • In EE2, these options must be set manually in config.php.
  • 21. Online Resources • ExpressionEngine.com User Guide • http://expressionengine.com/user_guide/general/caching.html • http://expressionengine.com/user_guide/general/ handling_extreme_traffic.html • http://expressionengine.com/user_guide/templates/flat_file_templates.html • http://expressionengine.com/legacy_docs/cp/admin/system_preferences/ tracking_preferences.html • SolSpace’s EE Website Performance Guidelines • http://www2.grist.org/misc/Performance_Guidelines.pdf
  • 22. Books • High Performance Web Sites, by Steve Souders: http://www.amazon.com/gp/product/0596529309 • Even Faster Web Sites, also by Steve Souders: http://www.amazon.com/gp/product/0596522304
  • 23. Nearby Groups • Boston Web Performance Group: http://www.meetup.com/Web-Performance-Boston/