SlideShare a Scribd company logo
1 of 22
Palm®     webOS™
          Internals
Exploring the Browser and JavaScript
                Greg Simon
       Sr. Director, webOS Platform
               April 24, 2010
What Do We Mean by the “Platform?”


              Your applications



            Mojo



               Browser engine



               JavaScript VM
Choices for a Browser Engine
... in 2008 when building webOS



           Gecko     WebKit       Opera     “Trident”




                     Safari,                Internet
          FireFox                 Opera
                    Chrome                  Explorer




           Open       Open        Closed-   Closed-
          Source     Source       Source    Source
Choices for a Browser Engine
... in 2008 when building webOS



           Gecko     WebKit




                     Safari,
          FireFox
                    Chrome




           Open       Open
          Source     Source
WebKit

• Already proven on
  mobile platforms
  • Symbian S60 in 2006
  • iPhone in 2007
• Very active open
  source community
• Tied to a high-quality
  commercial product
  (Safari)
JavaScript

• JavaScript wars!

• WebKit includes the “KJS” KDE JavaScript
  interpreter
• In 2008, Apple released a bytecode compiler
  “Squirrelfish,” then later the x86 backend “Nitro/
  Squirrelfish-extreme”

• In September 2008, Google released V8 as an
  alternative in WebKit

• What are the differences!?
JavaScript Engines


                      KJS          V8




                   Interpreted
          Type                   Compiled
                        JIT




         Backend      x86        x86, ARM
How JavaScript Code Gets
Executed in webOS




function foo()                     mov r1,r3         0100101000
    { ... }         AST             ldr 0,a          1001001010



 Source code     Logical tree   Assembly language Machine language
How JavaScript Code Gets
Executed in webOS


                           Compiled code from
                           Palm “the ROM”


    CPU


                           JS Code compiled
                           at runtime
How WebKit Works

<html>
<body>               function test()
   <div id=‘foo’>    { ... }
       ...

             #foo {
              border:1px
             solid
             ...                       WebKit

    Image icon


      Your app
How Your Application
Gets to the Screen

                                     html

  <html>
  <body>              head                  body
     <div
  id=‘foo’>
        ...
              title   meta   meta   h1       p     ul


    HTML
                                             a     li   li   li



                  DOM tree that represents the logical
                     structure of your document.
How Your Application Gets to the
   Screen

                                                               #foo {
                                                                border:1px
                                                               solid
                                                               ...

                                                                     CSS
                                   htm                                                            root


<html>               hea                 body                                       box                  box
<body>
   <div
id=‘foo’>
       ...
             title   met   meta   h1      p     ul
                                                                   +         #txt   box   #txt   img     box    box



                                          a     li   li   li                                             #txt   box   #txt   box
HTML
                             DOM tree                                        Render tree that describes
                                                                               how your document is
                                                                                      painted.
Rule of Performance
            #
                   1
The complexity of your CSS is proportional to
    the performance of your application.
Some Changes in the webOS Version
of WebKit

• Custom graphics system Piranha
• Loading local resources synchronously (1.4)
  • Removes some of the “web page” effect on initial paint
• window.palmGetResource() (1.0)
  • Synchronously read the contents of a file into a string—
    used extensively by Mojo
• PalmServiceBridge (1.0)
  • Used to communicate with the webOS service bus
  • Different than XHR because it can receive more than
    one response from “other side”
JavaScript Garbage Collection

• Paying your taxes!
• Unpredictable (well, sometimes)
  • Your app creates a lot of temporary objects
• Predictable (well, sometimes)
  • On finger down, the system will attempt to delay
    “expensive” GCs for a period of time
  • When the device goes idle webOS forces an exhaustive,
    expensive GC to make up for this

• With webOS 1.4 only two ways to “deal” with GC:
  • Minimize occurrence by not creating so many temporary
    objects
JavaScript Garbage Collection

• With webOS 1.4 only one way to “deal” with GC:
  • Minimize occurrence by not creating so many temporary
    objects
Rule of Performance
          #
                 2
Even though this is an embedded system,
    all “traditional” web performance
           techniques still apply.
Traditional Techniques Still Apply

• Sprite your images!
• Combine multiple files into one (JS, CSS)
• Use a tool like YUI Compressor or Google’s
  Closure Compiler to reduce the size of your script



• Consider all traditional “loading” tricks even
  though the data is coming from flash disk rather
  than the network!
Rule of Performance
           #
                  3
Even though this is “JavaScript” you should
                                ,
   still consider the impact of every line
                  you write.
Q &A
Exploring the Browser and JavaScript in webOS

More Related Content

What's hot

Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depthSanjay Willie
 
Introduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiIntroduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiMichael Rice
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sitesYann Malet
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用HomesteadChen Cheng-Wei
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Gavin Pickin
 
Chef meetup presentation
Chef meetup presentationChef meetup presentation
Chef meetup presentationCharles Johnson
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)LumoSpark
 
Hack & Fix, Hands on ColdFusion Security Training
Hack & Fix, Hands on ColdFusion Security TrainingHack & Fix, Hands on ColdFusion Security Training
Hack & Fix, Hands on ColdFusion Security TrainingColdFusionConference
 
MacSysAdmin Tools Smörgåsbord
MacSysAdmin Tools SmörgåsbordMacSysAdmin Tools Smörgåsbord
MacSysAdmin Tools SmörgåsbordTimothy Sutton
 
Learnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsLearnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsDonat Fritschy
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnishschoefmax
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheColdFusionConference
 
Introductory Overview to Managing AWS with Terraform
Introductory Overview to Managing AWS with TerraformIntroductory Overview to Managing AWS with Terraform
Introductory Overview to Managing AWS with TerraformMichael Heyns
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual InfrastructureBryan McLellan
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)WordCamp Cape Town
 

What's hot (20)

Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
Introduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiIntroduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomi
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sites
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用Homestead
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
 
Chef meetup presentation
Chef meetup presentationChef meetup presentation
Chef meetup presentation
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
 
Hack & Fix, Hands on ColdFusion Security Training
Hack & Fix, Hands on ColdFusion Security TrainingHack & Fix, Hands on ColdFusion Security Training
Hack & Fix, Hands on ColdFusion Security Training
 
MacSysAdmin Tools Smörgåsbord
MacSysAdmin Tools SmörgåsbordMacSysAdmin Tools Smörgåsbord
MacSysAdmin Tools Smörgåsbord
 
體驗 Hhvm
體驗 Hhvm體驗 Hhvm
體驗 Hhvm
 
Learnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsLearnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 Projects
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
 
Introductory Overview to Managing AWS with Terraform
Introductory Overview to Managing AWS with TerraformIntroductory Overview to Managing AWS with Terraform
Introductory Overview to Managing AWS with Terraform
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual Infrastructure
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
 

Viewers also liked

Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappFred Lin
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaMarakana Inc.
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Kazuhiro Ogura
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome OsSaurabh Jinturkar
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome ExtensionsSamantha Morra
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 

Viewers also liked (10)

Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox Webapp
 
Palm WebOS Overview
Palm WebOS OverviewPalm WebOS Overview
Palm WebOS Overview
 
What is a shell script
What is a shell scriptWhat is a shell script
What is a shell script
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
Chrome extensions
Chrome extensionsChrome extensions
Chrome extensions
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome Os
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome Extensions
 
Web o sppt
Web o spptWeb o sppt
Web o sppt
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 

Similar to Exploring the Browser and JavaScript in webOS

HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersSascha Corti
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension DevelopmentAbhinav Chittora
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch
 
How dojo works
How dojo worksHow dojo works
How dojo worksAmit Tyagi
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
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
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browserSabin Buraga
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSTimo Herttua
 
Document Object Model
Document Object ModelDocument Object Model
Document Object ModelMayur Mudgal
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022NAVER D2
 
JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017ElifTech
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentationvs4vijay
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 

Similar to Exploring the Browser and JavaScript in webOS (20)

HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
Firefox extension Development
Firefox extension DevelopmentFirefox extension Development
Firefox extension Development
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Html5
Html5Html5
Html5
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
Html5
Html5Html5
Html5
 
How dojo works
How dojo worksHow dojo works
How dojo works
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)Mobile Browser Internal (Blink Rendering Engine)
Mobile Browser Internal (Blink Rendering Engine)
 
Introduction to asp.net Wroclaw
Introduction to asp.net WroclawIntroduction to asp.net Wroclaw
Introduction to asp.net Wroclaw
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
HTML 5
HTML 5HTML 5
HTML 5
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browser
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSS
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentation
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 

Recently uploaded

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Exploring the Browser and JavaScript in webOS

  • 1.
  • 2. Palm® webOS™ Internals Exploring the Browser and JavaScript Greg Simon Sr. Director, webOS Platform April 24, 2010
  • 3. What Do We Mean by the “Platform?” Your applications Mojo Browser engine JavaScript VM
  • 4. Choices for a Browser Engine ... in 2008 when building webOS Gecko WebKit Opera “Trident” Safari, Internet FireFox Opera Chrome Explorer Open Open Closed- Closed- Source Source Source Source
  • 5. Choices for a Browser Engine ... in 2008 when building webOS Gecko WebKit Safari, FireFox Chrome Open Open Source Source
  • 6. WebKit • Already proven on mobile platforms • Symbian S60 in 2006 • iPhone in 2007 • Very active open source community • Tied to a high-quality commercial product (Safari)
  • 7. JavaScript • JavaScript wars! • WebKit includes the “KJS” KDE JavaScript interpreter • In 2008, Apple released a bytecode compiler “Squirrelfish,” then later the x86 backend “Nitro/ Squirrelfish-extreme” • In September 2008, Google released V8 as an alternative in WebKit • What are the differences!?
  • 8. JavaScript Engines KJS V8 Interpreted Type Compiled JIT Backend x86 x86, ARM
  • 9. How JavaScript Code Gets Executed in webOS function foo() mov r1,r3 0100101000 { ... } AST ldr 0,a 1001001010 Source code Logical tree Assembly language Machine language
  • 10. How JavaScript Code Gets Executed in webOS Compiled code from Palm “the ROM” CPU JS Code compiled at runtime
  • 11. How WebKit Works <html> <body> function test() <div id=‘foo’> { ... } ... #foo { border:1px solid ... WebKit Image icon Your app
  • 12. How Your Application Gets to the Screen html <html> <body> head body <div id=‘foo’> ... title meta meta h1 p ul HTML a li li li DOM tree that represents the logical structure of your document.
  • 13. How Your Application Gets to the Screen #foo { border:1px solid ... CSS htm root <html> hea body box box <body> <div id=‘foo’> ... title met meta h1 p ul + #txt box #txt img box box a li li li #txt box #txt box HTML DOM tree Render tree that describes how your document is painted.
  • 14. Rule of Performance # 1 The complexity of your CSS is proportional to the performance of your application.
  • 15. Some Changes in the webOS Version of WebKit • Custom graphics system Piranha • Loading local resources synchronously (1.4) • Removes some of the “web page” effect on initial paint • window.palmGetResource() (1.0) • Synchronously read the contents of a file into a string— used extensively by Mojo • PalmServiceBridge (1.0) • Used to communicate with the webOS service bus • Different than XHR because it can receive more than one response from “other side”
  • 16. JavaScript Garbage Collection • Paying your taxes! • Unpredictable (well, sometimes) • Your app creates a lot of temporary objects • Predictable (well, sometimes) • On finger down, the system will attempt to delay “expensive” GCs for a period of time • When the device goes idle webOS forces an exhaustive, expensive GC to make up for this • With webOS 1.4 only two ways to “deal” with GC: • Minimize occurrence by not creating so many temporary objects
  • 17. JavaScript Garbage Collection • With webOS 1.4 only one way to “deal” with GC: • Minimize occurrence by not creating so many temporary objects
  • 18. Rule of Performance # 2 Even though this is an embedded system, all “traditional” web performance techniques still apply.
  • 19. Traditional Techniques Still Apply • Sprite your images! • Combine multiple files into one (JS, CSS) • Use a tool like YUI Compressor or Google’s Closure Compiler to reduce the size of your script • Consider all traditional “loading” tricks even though the data is coming from flash disk rather than the network!
  • 20. Rule of Performance # 3 Even though this is “JavaScript” you should , still consider the impact of every line you write.
  • 21. Q &A

Editor's Notes