SlideShare a Scribd company logo
Front-end Performance
         Tips


    !quot;#$!%&'()*!+,-
Agenda

• Why Front-End?
• Loading phase
• Rendering phase
• Running phase
• Conclusion
Why Front-End?
Back-End vs. Front-End
• Performance Optimization
 • Back-end
 • Front-end
Back-End vs. Front-End
• Performance Optimization
 • Back-end
 • Front-end      1.969 sec




 0.099 sec            HTML loading time : 5%
Loading
Minimize HTTP Requests
 • Most Important Guideline
 • Performance Tuning
  • Same Contents
  • Low HTTP Request (=Connection)
 • Techniques
  • Simple Design
  • Combine Image/CSS/JavaScript
100


 75


 50


 25


  0
      html   iframe     flash   js        css   css image image

      Daum            Naver          Cyworld        Yahoo kr



              Request Stats.
                                                        by YSlow
Image

• Image map
• CSS Sprite
 • CSS width, height, background property
• Inline image
 • Base64 encoded image data URL format
<span style=“background-image:url('sprites.gif');
  background-position:-260px -90px;
  width:10px;height:10pxquot;></span>
CSS sprite - tv!
CSS sprite - tv!
CSS sprite - tv!
CSS sprite - tv!
CSS sprite - tv!
CSS sprite - YouTube
CSS sprite - YouTube
<img width=”10” height=”10” src=”p.gif”
style=”background:url(bg.gif)”/>
JavaScript/CSS combine

• JavaScript
 • variable, function conflict
• CSS
 • selector conflict
 • media=”print” ! @media print { }
@media rule
page.html
  <link ... href=”style.css” />
  <link ... href=”print.css” media=”print” />




page.html
  <link ... href=”style.css” />
style.css
  #wrap { … }
  @media print {
    #wrap { … }
  }
On demand loading

• Ajax
• Post Image loading
• Post JavaScript / CSS loading
Post image loading
Post image loading
<div onscroll=”deferLoad(‘key’)”><ul>
  <li><img src=”image1.gif” /></li>
  ...
  <li><img src=”blank.gif”
    onload=”registerDeferImg(‘key’,
    this,’image3.gif’)” /></li>
   ...
</ul></div>
Cookie

• Remove unnecessary cookie
• Set expire date
• Check domain level
• Separate static / dynamic resource domain
Rendering
Initial Layout

• Depend on HTML / CSS not JavaScript
• quot;# $ %& '(
 • Window/Frame size
 • Not fully supported css property
JavaScript Block Downloading
 • Move To Bottom
JavaScript block rendering
FOUC & Blank White Screen

 • Why?
  • @import or <link> at bottom
 • Blank White Screen
  • New Window / Homepage
 • Move To Top
FOUC & Blank White Screen
AlphaImageLoader filter

• Rendering Semi-transparent PNG24
• Problem
 •   Block Loading & Rendering, Freeze Browser

 • link & mouse pointer
• Solution
 •   IE conditional comment & IE6 ‘_’ hack
 •   a { position:relative; cursor:pointer; }
AlphaImageLoader demo
PNG24
AlphaImageLoader filter
            IE conditional comment
style.css
.png {background:transparent url(img.png) 0 0 no-repeat;}


page.html
<!--[if lte IE 6]>
<style type=”text/css”>
.png { background-image:none; filter:progid:
  DXImageTransform.Microsoft.AlphaImageLoader(
  src='img.png',sizingMethod='scale'); }
</style>
<![endif]-->
Efficient CSS selector

• Avoid universal rule
• Don't qualify ID-categorized rules with tag
  names or classes
• Avoid the descendant selector
• Rely on inheritance
Running
CSS expression
font-size:
     expression(document.body.clientWidth/10+‘px’);


• IE proprietary
• Continuously run when
   mousemove, keypress, resize, scroll event
• Solution / Alternate
 • One-time expression
 • Event Handling
Background Flickering

• :hover (mouse over) action
• IE6
 • Flickering
 • Re-Request
• http://fivesevensix.com/studies/ie6flicker/
Flickering demo
Background flickering Solution

• JavaScript
  document.execCommand(quot;BackgroundImageCachequot;,
    false, true);


• CSS
  html { filter:expression(document.execCommand(
    quot;BackgroundImageCachequot;, false, true)); }


• Web Server - Apache
  BrowserMatch quot;MSIEquot; brokenvary=1
  BrowserMatch quot;Mozilla/4.[0-9]{2}quot; brokenvary=1
  BrowserMatch quot;Operaquot; !brokenvary
  SetEnvIf brokenvary 1 force-no-vary
String Handling
• Concatenation
 • + operator ! array.join()
• Search
 • regexp ! string.indexOf()
• Regular Expression
 • new RegExp() ! / ~ / literal
DOM Access

• Minimize DOM access
• Offline access
• Reuse reference
50x50 table creation
           W3C DOM     Table methods           innerHTML
                                                                       by Windows XP,
                                                                      Quirksmode.org


    IE6

    IE7

Firefox2

Firefox3

 Opera

  Safari

           0         1,000             2,000               3,000               4,000
                                                                                 ms

                 DOM I/O test
Set Style
• by style property - BAD
   elm.style.backgroundColor = ‘#f00’;
   elm.style.width = ‘20px’;




• by CSS & className property - GOOD
   style.css
    .foo { background-color:#f00; width:20px; }
   script.js
    elm.className = ‘foo’;
4x425(1,700) td style
                      className         style         by Windows XP,
                                                      Quirksmode.org

    IE6

    IE7

Firefox2

Firefox3

 Opera

  Safari

           0    100               200           300               400
                                                                   ms


               Set Style test
JavaScript Framework

• prototype, jQuery,YUI ...
• Performance issue
 • File size
 • Internal object inheritance
• $() vs. document.getElementById()
the Others
•   Cache

•   CDN(Contents Delivery Network)

•   Domain name

    •   DNS lookup

    •   Parallel download

•   ETags

•   Redirect
Tools

• Firebug
• IBM page detailer
• YSlow
• Fiddler
Conclusion
• Front-end Performance
 • Trade-off
 • Service / Client environment
• As UI Developer
 • Unobtrusive JavaScript
 • Development Process
 • Accessibility
References
• YDN Exceptional Performance :
  Best Practices for Speeding Up Your Web Site

• ) *+, -./ 01(High Performance
  Web Sites), 2'3, Steve Souders

• QuirksMode.org
Q/A
Thank you
   suguni@gmail.com
http://yuiworld.kr/suguni

More Related Content

What's hot

Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
Seravo
 
Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it worksIlya Grigorik
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentation
Justin Dorfman
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
Remy Sharp
 
YSlow 2.0
YSlow 2.0YSlow 2.0
YSlow 2.0
Stoyan Stefanov
 
WordPress and Ajax
WordPress and AjaxWordPress and Ajax
WordPress and Ajax
Ronald Huereca
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
Vivian S. Zhang
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
Jim Jeffers
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
Vincenzo Barone
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
panagenda
 
Liking performance
Liking performanceLiking performance
Liking performance
Stoyan Stefanov
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
Suwash Kunwar
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Leonardo Balter
 
Scaling Drupal: Not IF... HOW
Scaling Drupal: Not IF... HOWScaling Drupal: Not IF... HOW
Scaling Drupal: Not IF... HOW
Treehouse Agency
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
dynamis
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
Andy Davies
 

What's hot (20)

Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 
Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentation
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
 
YSlow 2.0
YSlow 2.0YSlow 2.0
YSlow 2.0
 
WordPress and Ajax
WordPress and AjaxWordPress and Ajax
WordPress and Ajax
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
 
Liking performance
Liking performanceLiking performance
Liking performance
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
Scaling Drupal: Not IF... HOW
Scaling Drupal: Not IF... HOWScaling Drupal: Not IF... HOW
Scaling Drupal: Not IF... HOW
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
 
Os Furlong
Os FurlongOs Furlong
Os Furlong
 

Viewers also liked

Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010
Matt Martz
 
Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2
Quoimaligne Idf
 
Web performance tuning
Web performance tuning Web performance tuning
Web performance tuning
Sendhil Kumar Kannan
 
London Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companiesLondon Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companies
Strangeloop
 
Bootstrap with liferay
Bootstrap with liferayBootstrap with liferay
Bootstrap with liferay
Sendhil Kumar Kannan
 

Viewers also liked (6)

Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010
 
Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2
 
git
gitgit
git
 
Web performance tuning
Web performance tuning Web performance tuning
Web performance tuning
 
London Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companiesLondon Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companies
 
Bootstrap with liferay
Bootstrap with liferayBootstrap with liferay
Bootstrap with liferay
 

Similar to Front end performance tip

Coding the UI
Coding the UICoding the UI
Coding the UI
Mark Meeker
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
Andy Budd
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
Stoyan Stefanov
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajax
wolframkriesing
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance DjangoDjangoCon2008
 
High Performance Django 1
High Performance Django 1High Performance Django 1
High Performance Django 1DjangoCon2008
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)
jeresig
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
Chris Love
 
Beyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance ChecklistBeyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance Checklist
Cloudinary
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
Fwdays
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
Robert Nyman
 
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
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
Binary Studio
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the process
guest3379bd
 
Nanoformats
NanoformatsNanoformats
Nanoformats
rozario
 
Performance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptPerformance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScript
jeresig
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
Brian Moon
 

Similar to Front end performance tip (20)

Coding the UI
Coding the UICoding the UI
Coding the UI
 
Coding Ui
Coding UiCoding Ui
Coding Ui
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
 
CSS and image optimization
CSS and image optimizationCSS and image optimization
CSS and image optimization
 
The Future of CSS
The Future of CSSThe Future of CSS
The Future of CSS
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajax
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance Django
 
High Performance Django 1
High Performance Django 1High Performance Django 1
High Performance Django 1
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Beyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance ChecklistBeyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance Checklist
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
 
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
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the process
 
Nanoformats
NanoformatsNanoformats
Nanoformats
 
Performance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptPerformance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScript
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 

Front end performance tip

  • 1. Front-end Performance Tips !quot;#$!%&'()*!+,-
  • 2. Agenda • Why Front-End? • Loading phase • Rendering phase • Running phase • Conclusion
  • 4. Back-End vs. Front-End • Performance Optimization • Back-end • Front-end
  • 5. Back-End vs. Front-End • Performance Optimization • Back-end • Front-end 1.969 sec 0.099 sec HTML loading time : 5%
  • 7. Minimize HTTP Requests • Most Important Guideline • Performance Tuning • Same Contents • Low HTTP Request (=Connection) • Techniques • Simple Design • Combine Image/CSS/JavaScript
  • 8. 100 75 50 25 0 html iframe flash js css css image image Daum Naver Cyworld Yahoo kr Request Stats. by YSlow
  • 9. Image • Image map • CSS Sprite • CSS width, height, background property • Inline image • Base64 encoded image data URL format
  • 10. <span style=“background-image:url('sprites.gif'); background-position:-260px -90px; width:10px;height:10pxquot;></span>
  • 16. CSS sprite - YouTube
  • 17. CSS sprite - YouTube <img width=”10” height=”10” src=”p.gif” style=”background:url(bg.gif)”/>
  • 18. JavaScript/CSS combine • JavaScript • variable, function conflict • CSS • selector conflict • media=”print” ! @media print { }
  • 19. @media rule page.html <link ... href=”style.css” /> <link ... href=”print.css” media=”print” /> page.html <link ... href=”style.css” /> style.css #wrap { … } @media print { #wrap { … } }
  • 20. On demand loading • Ajax • Post Image loading • Post JavaScript / CSS loading
  • 22. Post image loading <div onscroll=”deferLoad(‘key’)”><ul> <li><img src=”image1.gif” /></li> ... <li><img src=”blank.gif” onload=”registerDeferImg(‘key’, this,’image3.gif’)” /></li> ... </ul></div>
  • 23. Cookie • Remove unnecessary cookie • Set expire date • Check domain level • Separate static / dynamic resource domain
  • 25. Initial Layout • Depend on HTML / CSS not JavaScript • quot;# $ %& '( • Window/Frame size • Not fully supported css property
  • 26. JavaScript Block Downloading • Move To Bottom
  • 28. FOUC & Blank White Screen • Why? • @import or <link> at bottom • Blank White Screen • New Window / Homepage • Move To Top
  • 29. FOUC & Blank White Screen
  • 30. AlphaImageLoader filter • Rendering Semi-transparent PNG24 • Problem • Block Loading & Rendering, Freeze Browser • link & mouse pointer • Solution • IE conditional comment & IE6 ‘_’ hack • a { position:relative; cursor:pointer; }
  • 32. PNG24
  • 33. AlphaImageLoader filter IE conditional comment style.css .png {background:transparent url(img.png) 0 0 no-repeat;} page.html <!--[if lte IE 6]> <style type=”text/css”> .png { background-image:none; filter:progid: DXImageTransform.Microsoft.AlphaImageLoader( src='img.png',sizingMethod='scale'); } </style> <![endif]-->
  • 34. Efficient CSS selector • Avoid universal rule • Don't qualify ID-categorized rules with tag names or classes • Avoid the descendant selector • Rely on inheritance
  • 36. CSS expression font-size: expression(document.body.clientWidth/10+‘px’); • IE proprietary • Continuously run when mousemove, keypress, resize, scroll event • Solution / Alternate • One-time expression • Event Handling
  • 37. Background Flickering • :hover (mouse over) action • IE6 • Flickering • Re-Request • http://fivesevensix.com/studies/ie6flicker/
  • 39. Background flickering Solution • JavaScript document.execCommand(quot;BackgroundImageCachequot;, false, true); • CSS html { filter:expression(document.execCommand( quot;BackgroundImageCachequot;, false, true)); } • Web Server - Apache BrowserMatch quot;MSIEquot; brokenvary=1 BrowserMatch quot;Mozilla/4.[0-9]{2}quot; brokenvary=1 BrowserMatch quot;Operaquot; !brokenvary SetEnvIf brokenvary 1 force-no-vary
  • 40. String Handling • Concatenation • + operator ! array.join() • Search • regexp ! string.indexOf() • Regular Expression • new RegExp() ! / ~ / literal
  • 41. DOM Access • Minimize DOM access • Offline access • Reuse reference
  • 42. 50x50 table creation W3C DOM Table methods innerHTML by Windows XP, Quirksmode.org IE6 IE7 Firefox2 Firefox3 Opera Safari 0 1,000 2,000 3,000 4,000 ms DOM I/O test
  • 43. Set Style • by style property - BAD elm.style.backgroundColor = ‘#f00’; elm.style.width = ‘20px’; • by CSS & className property - GOOD style.css .foo { background-color:#f00; width:20px; } script.js elm.className = ‘foo’;
  • 44. 4x425(1,700) td style className style by Windows XP, Quirksmode.org IE6 IE7 Firefox2 Firefox3 Opera Safari 0 100 200 300 400 ms Set Style test
  • 45. JavaScript Framework • prototype, jQuery,YUI ... • Performance issue • File size • Internal object inheritance • $() vs. document.getElementById()
  • 46. the Others • Cache • CDN(Contents Delivery Network) • Domain name • DNS lookup • Parallel download • ETags • Redirect
  • 47. Tools • Firebug • IBM page detailer • YSlow • Fiddler
  • 49. • Front-end Performance • Trade-off • Service / Client environment • As UI Developer • Unobtrusive JavaScript • Development Process • Accessibility
  • 50. References • YDN Exceptional Performance : Best Practices for Speeding Up Your Web Site • ) *+, -./ 01(High Performance Web Sites), 2'3, Steve Souders • QuirksMode.org
  • 51. Q/A
  • 52. Thank you suguni@gmail.com http://yuiworld.kr/suguni