SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
Building High Performance
 iPhone Applications with
         Flash CS5


Mike Chambers
Principal Product Manager
Developer Relations
Flash Platform
Flash Pro CS5



   Adobe Flash CS5 will include support for
packaging stand-alone apps for the Apple iPhone
Flash Player 10.1

                                        Smartphone enabled
                                        Multitouch, accelerometer, screen
                                        orientation
                                        Optimized memory, power,
                                        hardware acceleration
                                        RAW Microphone Access
                                        Global Error Handler


                         Public Beta on Labs Now!

Announcement #2 : Flash Player 10.1 - Browser, Desktop (via Adobe AIR 2.0), and
smart phones
New APIs
     • MultiTouch
     • Screen Orientation
     • MediaLibrary                NEW
                                      !
     • Accelerometer
     • Geo-location
     • Cut / Copy / Paste
     • Native TextInput
     • tel:, mailto:, maps:, video:
Not necessarily iPhone specific APIs.
Flash Player 10.1 will be available across both browsers, desktops and devices. This includes
in Adobe AIR 2.0, as well as Flash Player for Palm Pre, Android and Windows Mobile devices.
No Flash Player for Safari Mobile on
                                  iPhone

Basically, we need apple’s help with this. However, as the Palm Pre and Android Flash Player
demos have shown, Flash content can perform well on this class of devices.
Already a number of iphone applications created with Flash on the itunes app store.
demo
How does it work?
LLVM
                      Low Level Virtual Machine

      Open source compiler infrastructure designed for
      optimizing programs written in arbitrary
      programming languages

       Capable of generating machine code for various
       targets including x86 and ARM processors

                         Used in Alchemy
http://www.llvm.org
Front End           Compilation / Optimization   Back End



             SWF /                                             x86
              ABC


               C                                              ARM



              C++                        LLVM                 PPC



              Java                                           Spark



               ...                                              ...



Adobe built a SWF / ABC front-end for LLVM
Develop           Publish       Package     Deploy




                                      Certificate


                         SWF



                        app.xml          PFI        .ipa



  Flash Pro CS5      app:/resources




Publishing workflow
AOT Compilation
• Ahead of Time (AOT) compilation
• iPhone License Restricts interpreters
 • Cant JIT code
 • No Interpreter
• Compiles ABC bytecode from SWF
• LLVM Base compile toolchain
PFI

                                                     Certificate


                                    .app
      SWF                AOT          “swf.exe”
                                                                  .ipa
                                                       Sign /
    app.xml            .plist gen      info.plist                   Signed
                                                      Package
                                                                     .app
   resources                        app:/resources




ADT input and output
AOT Compilation
     Flash CS5           .swf               AOT                  swf.exe
                                                                  swf
         AS3               ABC1               ABC
                                             Compiler               ABC1 SHA1
         AS3               ABC2
                                                                    ABC1 SHA2
        SWC                                   LLVM
                                             Bytecode
       timeline           timeline                                      timeline

        assets             assets             LLVM                       assets
                                             Codegen
                                                                           ARM

                                          Flash Runtime            Flash Runtime
                                              Library                  Library



AOT Compilation. Notice that there is a library form of the Flash Player runtime included in
the application. ABC bytecode is compiled to native arm code.
Developing Content
APIs




              Flash Player 10.1                          Adobe AIR 2.0



APIs set available is based on Flash Player 10.1 and Adobe AIR 2.0
Development Workflow

                    Flash CS5


    Test                SWF              Test and Deploy

              Desktop            .ipa


                                iTunes


                                Device
In order to deploy an ipa / app to the device, you must be part of the Apple developer
program, and have the appropriate certificates and provisioning profiles setup.
Demo
Performance Tips and
       Tricks
• Most will improve performance / memory
  usage on desktop
• General ActionScript performance
  techniques also apply to device
!=


iPhone development is mobile development. It has a significantly slower processor that what
you are used to on your desktop.
Screen Size           UI Interactions              Performance




                                        !=


This affects Screen Size, UI Interactions and most importantly performance. We will focus on
performance.
Test and Profile Code




                         Profile External Application




Profile external SWFs from Flash / Flex Builder. Profile Prospective > Profile > Profile External
Application
AS3 Performance Testing Harness
                               Grant Skinner
                         bit.ly/as3performance




Make sure to test optimization results.
Remote Device Debugging from Flash CS5




Debug > Begin Remote Debug Session > ActionScript 3
Mac Only
Instruments


              Mac Only
Shark


        Mac Only
Simple Game Framework



  github.com/mikechambers
Rendering
• Hardware Composition is available for
  DisplayObjects
• Can greatly improve performance
• Uses OpenGL ES-1
• APIs will be available on additional
  platforms
Software Rendering




Software rendering renders entire display (including composition) via software. CPU intensive.
GPU Compositing




CPU Composition. Individual elements rendered via software, but are then composited / put
together in hardware. Can be very fast.
GPU Pipeline with Cached Surfaces
                GPU Pipeline with cached surfaces
                                                        Flash renderer (RAM)




                                                             Textures (GPU)




Individual elements can be cached and then composited in hardware.
Using GPU
                         Composition
          • cacheAsBitmap:Boolean                                    NEW
                                                                          !

          • cacheAsBitmapMatrix:Matrix
          • Using 2.5D Apis
           • Such as setting z property

cacheAsSurface new API. Transforms on a display object does not cause it to be re-rendered
via software.
cacheAsBitmap
cacheAsBitmap               cacheAsBitmapMatrix
 • Geometric Translations    • Geometric Dilation
 • Changes in X / Y          • Rotation
 • Tweens                    • Scaling
• Can set cacheAsBitmap in IDE or Code
• Have to subclass DisplayObject to set
  cacheAsBitmapMatrix (can’t set in IDE)
• SGF : CachedSprite.as
Debugging HWA
 CTTextureUploadTracking
Use GPU!!!
• Hardware accelerate everything
 • Except for items that re-draw often
• Break up display objects to minimize re-
  draws
• Don’t cache clips that have children that
  move / change
• Keep display list shallow
Prevent Redraws
• Items moving over non-cached
  DisplayObjects
• Visual content changes
 • Drawing API
 • Children moving / changing
• ColorTransformations
• Removing from display list
Minimize Instance
       Allocations
• Reuse object instances
• Memory Allocation very expensive
• Reduces Garbage collection
• Reduces CPU / Initialization costs
Object Pooling

• Reuses Object instances
• Avoid constant initialization and garbage
  collection
• Particularly useful for DisplayObjects
  composited by GPU
Pooling DisplayObjects

• Re-use cached DisplayObjects
• Keep on stage (off screen)
• Can give major performance boosts
• PewPew
GameObjectPool.as
 SoundManager.as
Time Management

• In General, ENTER_FRAME performs
  better than Timer
• Use single listener, and then dispatch
• SGF : TickManager.as
Event Dispatching

• Can be very expensive
• Requires several memory allocations
• Consider using callbacks in CPU intensive
  areas
• Consider Reusing Event instances
Event Propagation

• Can be very expensive, especially on display
  list instances.
• Event.stopPropagation();
• Event.stopImmediatePropagation();
Mouse / Touch Events
• Can disable with
 • mouseEnabled
 • mouseChildren
• Don’t use MouseEvent.MOUSE_MOVE
 • Check Mouse position at interval
 • Example
Can listen for MOUSE_UP
MOUSE_DOWN events to toggle
Optimizing Mobile Content for the Adobe Flash Platform
                   Thibault Imbert



                bytearray.org/?p=1363
Mike Chambers

                                               www.mikechambers.com
                                                    twitter.com/mesh
                                                    mesh@adobe.com




All links at : http://www.mikechambers.com/blog/2009/10/17/resources-for-learning-
more-about-flash-to-iphone/
Baby Crying
      http://www.flickr.com/photos/bbaunach/1055569383/




Photo credit.

Mais conteúdo relacionado

Mais procurados

Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstRaymond Camden
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
Part 1 workbench basics
Part 1 workbench basicsPart 1 workbench basics
Part 1 workbench basicstechbed
 
cbmanual
cbmanualcbmanual
cbmanualMatt D
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Mikkel Flindt Heisterberg
 
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanPlugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanRack Lin
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMPaulThwaite
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouJohn Pape
 
How To Access Code In Large w/ Vim
How To Access Code In Large w/ VimHow To Access Code In Large w/ Vim
How To Access Code In Large w/ VimCheng Hsien Chen
 
Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012Benjamin Cabé
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...PaulThwaite
 
Under the Hood of the Testarossa JIT Compiler
Under the Hood of the Testarossa JIT CompilerUnder the Hood of the Testarossa JIT Compiler
Under the Hood of the Testarossa JIT CompilerMark Stoodley
 
Beyond Continuous Delivery at DevOpsDays Rome 2012
Beyond Continuous Delivery at DevOpsDays Rome 2012Beyond Continuous Delivery at DevOpsDays Rome 2012
Beyond Continuous Delivery at DevOpsDays Rome 2012Chris Hilton
 

Mais procurados (18)

Codename one
Codename oneCodename one
Codename one
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Part 1 workbench basics
Part 1 workbench basicsPart 1 workbench basics
Part 1 workbench basics
 
cbmanual
cbmanualcbmanual
cbmanual
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
 
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanPlugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVM
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell You
 
How To Access Code In Large w/ Vim
How To Access Code In Large w/ VimHow To Access Code In Large w/ Vim
How To Access Code In Large w/ Vim
 
Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012
 
Introducing J2ME Polish
Introducing J2ME PolishIntroducing J2ME Polish
Introducing J2ME Polish
 
Eclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three RuntimesEclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three Runtimes
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
 
Sap tutorial
Sap tutorialSap tutorial
Sap tutorial
 
Under the Hood of the Testarossa JIT Compiler
Under the Hood of the Testarossa JIT CompilerUnder the Hood of the Testarossa JIT Compiler
Under the Hood of the Testarossa JIT Compiler
 
Project Zero JavaOne 2008
Project Zero JavaOne 2008Project Zero JavaOne 2008
Project Zero JavaOne 2008
 
Beyond Continuous Delivery at DevOpsDays Rome 2012
Beyond Continuous Delivery at DevOpsDays Rome 2012Beyond Continuous Delivery at DevOpsDays Rome 2012
Beyond Continuous Delivery at DevOpsDays Rome 2012
 

Semelhante a Flash Iphone Fitc 2010

Flash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange CountyFlash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange CountyJuan Sanchez
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Joseph Labrecque
 
Flash platform introduction
Flash platform introductionFlash platform introduction
Flash platform introductionatomlin
 
Flash for Blackberry, iPhone and Android
Flash for Blackberry, iPhone and AndroidFlash for Blackberry, iPhone and Android
Flash for Blackberry, iPhone and AndroidMindgrub Technologies
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFrançois Le Droff
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Marc Müller
 
I didnt know Flex could do this
I didnt know Flex could do thisI didnt know Flex could do this
I didnt know Flex could do thise27
 
The Business of Microsoft Silverlight
The Business of Microsoft SilverlightThe Business of Microsoft Silverlight
The Business of Microsoft Silverlightgoodfriday
 
The Evolution of the Flash Platform
The Evolution of the Flash PlatformThe Evolution of the Flash Platform
The Evolution of the Flash PlatformPeter Elst
 
Flash Lite, un’occasione da 1.3 Miliardi di mobile phones
Flash Lite, un’occasione da 1.3 Miliardi di mobile phonesFlash Lite, un’occasione da 1.3 Miliardi di mobile phones
Flash Lite, un’occasione da 1.3 Miliardi di mobile phonesbiskero
 
Flash/ActionScript
Flash/ActionScriptFlash/ActionScript
Flash/ActionScriptguestc0b52c5
 
Flash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsFlash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsRIA RUI Society
 
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...Joseph Labrecque
 
Spring Roo Flex Add-on
Spring Roo Flex Add-onSpring Roo Flex Add-on
Spring Roo Flex Add-onBill Ott
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko3D
 
Adobe Max 2009 - Learnings
Adobe Max 2009 -  LearningsAdobe Max 2009 -  Learnings
Adobe Max 2009 - Learningsziblu
 
Flex Air Intro
Flex Air IntroFlex Air Intro
Flex Air IntroJUG Genova
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)mafffffe19
 

Semelhante a Flash Iphone Fitc 2010 (20)

Flash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange CountyFlash Catalyst at Flex Camp Orange County
Flash Catalyst at Flex Camp Orange County
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.
 
Flash platform introduction
Flash platform introductionFlash platform introduction
Flash platform introduction
 
Flash for Blackberry, iPhone and Android
Flash for Blackberry, iPhone and AndroidFlash for Blackberry, iPhone and Android
Flash for Blackberry, iPhone and Android
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
Adobe Flash and Device Central
Adobe Flash and Device CentralAdobe Flash and Device Central
Adobe Flash and Device Central
 
I didnt know Flex could do this
I didnt know Flex could do thisI didnt know Flex could do this
I didnt know Flex could do this
 
The Business of Microsoft Silverlight
The Business of Microsoft SilverlightThe Business of Microsoft Silverlight
The Business of Microsoft Silverlight
 
The Evolution of the Flash Platform
The Evolution of the Flash PlatformThe Evolution of the Flash Platform
The Evolution of the Flash Platform
 
Flash Lite, un’occasione da 1.3 Miliardi di mobile phones
Flash Lite, un’occasione da 1.3 Miliardi di mobile phonesFlash Lite, un’occasione da 1.3 Miliardi di mobile phones
Flash Lite, un’occasione da 1.3 Miliardi di mobile phones
 
Flash/ActionScript
Flash/ActionScriptFlash/ActionScript
Flash/ActionScript
 
Flash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsFlash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applications
 
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
 
Spring Roo Flex Add-on
Spring Roo Flex Add-onSpring Roo Flex Add-on
Spring Roo Flex Add-on
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
Adobe Max 2009 - Learnings
Adobe Max 2009 -  LearningsAdobe Max 2009 -  Learnings
Adobe Max 2009 - Learnings
 
Arm
ArmArm
Arm
 
Flex Air Intro
Flex Air IntroFlex Air Intro
Flex Air Intro
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)
 

Último

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Flash Iphone Fitc 2010

  • 1. Building High Performance iPhone Applications with Flash CS5 Mike Chambers Principal Product Manager Developer Relations Flash Platform
  • 2. Flash Pro CS5 Adobe Flash CS5 will include support for packaging stand-alone apps for the Apple iPhone
  • 3. Flash Player 10.1 Smartphone enabled Multitouch, accelerometer, screen orientation Optimized memory, power, hardware acceleration RAW Microphone Access Global Error Handler Public Beta on Labs Now! Announcement #2 : Flash Player 10.1 - Browser, Desktop (via Adobe AIR 2.0), and smart phones
  • 4. New APIs • MultiTouch • Screen Orientation • MediaLibrary NEW ! • Accelerometer • Geo-location • Cut / Copy / Paste • Native TextInput • tel:, mailto:, maps:, video: Not necessarily iPhone specific APIs.
  • 5. Flash Player 10.1 will be available across both browsers, desktops and devices. This includes in Adobe AIR 2.0, as well as Flash Player for Palm Pre, Android and Windows Mobile devices.
  • 6. No Flash Player for Safari Mobile on iPhone Basically, we need apple’s help with this. However, as the Palm Pre and Android Flash Player demos have shown, Flash content can perform well on this class of devices.
  • 7. Already a number of iphone applications created with Flash on the itunes app store.
  • 9. How does it work?
  • 10. LLVM Low Level Virtual Machine Open source compiler infrastructure designed for optimizing programs written in arbitrary programming languages Capable of generating machine code for various targets including x86 and ARM processors Used in Alchemy http://www.llvm.org
  • 11. Front End Compilation / Optimization Back End SWF / x86 ABC C ARM C++ LLVM PPC Java Spark ... ... Adobe built a SWF / ABC front-end for LLVM
  • 12. Develop Publish Package Deploy Certificate SWF app.xml PFI .ipa Flash Pro CS5 app:/resources Publishing workflow
  • 13. AOT Compilation • Ahead of Time (AOT) compilation • iPhone License Restricts interpreters • Cant JIT code • No Interpreter • Compiles ABC bytecode from SWF • LLVM Base compile toolchain
  • 14. PFI Certificate .app SWF AOT “swf.exe” .ipa Sign / app.xml .plist gen info.plist Signed Package .app resources app:/resources ADT input and output
  • 15. AOT Compilation Flash CS5 .swf AOT swf.exe swf AS3 ABC1 ABC Compiler ABC1 SHA1 AS3 ABC2 ABC1 SHA2 SWC LLVM Bytecode timeline timeline timeline assets assets LLVM assets Codegen ARM Flash Runtime Flash Runtime Library Library AOT Compilation. Notice that there is a library form of the Flash Player runtime included in the application. ABC bytecode is compiled to native arm code.
  • 17. APIs Flash Player 10.1 Adobe AIR 2.0 APIs set available is based on Flash Player 10.1 and Adobe AIR 2.0
  • 18. Development Workflow Flash CS5 Test SWF Test and Deploy Desktop .ipa iTunes Device
  • 19. In order to deploy an ipa / app to the device, you must be part of the Apple developer program, and have the appropriate certificates and provisioning profiles setup.
  • 20. Demo
  • 21. Performance Tips and Tricks • Most will improve performance / memory usage on desktop • General ActionScript performance techniques also apply to device
  • 22. != iPhone development is mobile development. It has a significantly slower processor that what you are used to on your desktop.
  • 23. Screen Size UI Interactions Performance != This affects Screen Size, UI Interactions and most importantly performance. We will focus on performance.
  • 24. Test and Profile Code Profile External Application Profile external SWFs from Flash / Flex Builder. Profile Prospective > Profile > Profile External Application
  • 25. AS3 Performance Testing Harness Grant Skinner bit.ly/as3performance Make sure to test optimization results.
  • 26. Remote Device Debugging from Flash CS5 Debug > Begin Remote Debug Session > ActionScript 3
  • 28. Instruments Mac Only
  • 29. Shark Mac Only
  • 30. Simple Game Framework github.com/mikechambers
  • 31. Rendering • Hardware Composition is available for DisplayObjects • Can greatly improve performance • Uses OpenGL ES-1 • APIs will be available on additional platforms
  • 32.
  • 33. Software Rendering Software rendering renders entire display (including composition) via software. CPU intensive.
  • 34. GPU Compositing CPU Composition. Individual elements rendered via software, but are then composited / put together in hardware. Can be very fast.
  • 35. GPU Pipeline with Cached Surfaces GPU Pipeline with cached surfaces Flash renderer (RAM) Textures (GPU) Individual elements can be cached and then composited in hardware.
  • 36. Using GPU Composition • cacheAsBitmap:Boolean NEW ! • cacheAsBitmapMatrix:Matrix • Using 2.5D Apis • Such as setting z property cacheAsSurface new API. Transforms on a display object does not cause it to be re-rendered via software.
  • 37.
  • 38. cacheAsBitmap cacheAsBitmap cacheAsBitmapMatrix • Geometric Translations • Geometric Dilation • Changes in X / Y • Rotation • Tweens • Scaling
  • 39. • Can set cacheAsBitmap in IDE or Code • Have to subclass DisplayObject to set cacheAsBitmapMatrix (can’t set in IDE) • SGF : CachedSprite.as
  • 41.
  • 42. Use GPU!!! • Hardware accelerate everything • Except for items that re-draw often • Break up display objects to minimize re- draws • Don’t cache clips that have children that move / change • Keep display list shallow
  • 43. Prevent Redraws • Items moving over non-cached DisplayObjects • Visual content changes • Drawing API • Children moving / changing • ColorTransformations • Removing from display list
  • 44. Minimize Instance Allocations • Reuse object instances • Memory Allocation very expensive • Reduces Garbage collection • Reduces CPU / Initialization costs
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. Object Pooling • Reuses Object instances • Avoid constant initialization and garbage collection • Particularly useful for DisplayObjects composited by GPU
  • 51. Pooling DisplayObjects • Re-use cached DisplayObjects • Keep on stage (off screen) • Can give major performance boosts • PewPew
  • 53. Time Management • In General, ENTER_FRAME performs better than Timer • Use single listener, and then dispatch • SGF : TickManager.as
  • 54. Event Dispatching • Can be very expensive • Requires several memory allocations • Consider using callbacks in CPU intensive areas • Consider Reusing Event instances
  • 55.
  • 56. Event Propagation • Can be very expensive, especially on display list instances. • Event.stopPropagation(); • Event.stopImmediatePropagation();
  • 57.
  • 58. Mouse / Touch Events • Can disable with • mouseEnabled • mouseChildren • Don’t use MouseEvent.MOUSE_MOVE • Check Mouse position at interval • Example
  • 59. Can listen for MOUSE_UP MOUSE_DOWN events to toggle
  • 60. Optimizing Mobile Content for the Adobe Flash Platform Thibault Imbert bytearray.org/?p=1363
  • 61. Mike Chambers www.mikechambers.com twitter.com/mesh mesh@adobe.com All links at : http://www.mikechambers.com/blog/2009/10/17/resources-for-learning- more-about-flash-to-iphone/
  • 62. Baby Crying http://www.flickr.com/photos/bbaunach/1055569383/ Photo credit.