SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
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.

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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)
 

Kürzlich hochgeladen

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

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.