Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High Performance Android (Google Developer Group Los Angeles, August 20, 2015)

mscheel
August 20, 2015

High Performance Android (Google Developer Group Los Angeles, August 20, 2015)

Talk given at General Assembly in Santa Monica, CA by Mark Scheel

mscheel

August 20, 2015
Tweet

More Decks by mscheel

Other Decks in Technology

Transcript

  1. H I G H P E R F O R

    M A N C E A N D R O I D M A R K S C H E E L ( @ 5 2 8 0 M A R K ) #highperfandroid Los Angeles, USA - August 20, 2015
  2. B E A U T I F U L S

    N O W F L A K E S
  3. P E R F O R M A N C

    E • Merriam Webster - “the execution of an action” • So what is “High Performance”? #highperformance
  4. P E R F O R M A N C

    E S U M M A RY • Build Systems • Size matters • First impressions • Tools from Google #highperfandroid
  5. B U I L D S Y S T E

    M S • Consistent • Repeatable • Consistable #consistable
  6. B U I L D S Y S T E

    M S #consistable
  7. VA G R A N T • Vagrant is software

    that creates and configures virtual development environments • Virtual Box, and now VmWare, KVM and Amazon EC2 • Written in Ruby by Mitchell Mashimoto • November 2014 added Docker support #consistable
  8. VA G R A N T • Recipe is called

    “Vagrantfile” • You can create reproducible and portable environments, excellent for experimentation AND sharing • A single file defines the machine, can be checked into source control • No more “works on my machine” #consistable
  9. VA G R A N T • Learn more at

    vagrantup.com • $ vagrant up • $ vagrant ssh • $ vagrant halt • $vagrant destroy #consistable
  10. J E N K I N S • Java based,

    forked from Hudson after Oracle drama • Continuous Integration software • Monitors execution of builds • Makes it easy for anyone to make a build, turn source into product #consistable
  11. J E N K I N S • Pro Tip:

    Install in a container, avoid service sludge • Pro Tip: Name your jobs consistently • Pro Tip: Clean your workspace! • Pro Tip: Have a process for broken builds #consistable
  12. J E N K I N S • Jenkins builds

    can be triggered by a commit or many other triggers (cron, etc) • Consistently and repeatedly build your project the same way • Started by Kohsuke Kawaguchi #consistable
  13. J E N K I N S • Plugin Support

    • Publish to Play Store (Google Publish) • Git • Gradle • Credentials Binding (secrets) • Findbugs • Android emulator • Android Lint • Checkstyle • DRY • PMD - like findbugs, analyzes byte code for potential glitches • Warnings - Displays compiler warnings • Static Code Analysis - Compiles many of above and puts into a graph #consistable
  14. J E N K I N S • Slaves -

    can be docker instances • Master Slave model allows many builds from one master • Slaves can be local, remote, containers etc #consistable
  15. D O C K E R • Initially written in

    Go by Solomon Hykes • Docker automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. • Docker uses resource isolation features of the Linux kernel such ascgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines #consistable
  16. D O C K E R • Build, Ship, Run

    • Make your SysAdmin or Ops guy happy • Great for apps with distributed resources
  17. D O C K E R • Won’t run on

    Mac out of the box, OS X doesn’t support system-level virtualization even though BSD has jails • boot2docker or run inside vagrant Ubuntu • Google still supports, even though Kubernetes • Learn more - docker.com #consistable
  18. VA G R A N T A N D D

    O C K E R • Mac is host • It has Vagrant inside of it • inside of Vagrant /vagrant maps to host folder where Vagrantfile is • Can map from inside Docker to /vagrant with commands like: • docker run -v $WORKSPACE:/host:rw android_test_image bash -c "sh ./create-orders-json.sh && cp /usr/src/app/ order.json /host" #consistable
  19. M O R E T O O L S •

    Espresso for integration testing • Google Cloud Test Lab and AWS Device Farm • TestFairy • Alpha and Beta Release channels #consistable
  20. E N D T O E N D • Consistent

    repeatable systems • Building software regularly • Saving artifacts of build process for postmortems • Regular testing reports, unit and integration • And regularly deploy to testers #consistable
  21. P E R F O R M A N C

    E S U M M A RY • Build Systems • Size matters • First impressions • Tools from Google #highperfandroid
  22. S I Z E M AT T E R S

    #highperfandroid
  23. S I Z E M AT T E R S

    • https://code.facebook.com/posts/991252547593574 • re-imagination of JPEG headers • August 6, 2015 #highperfandroid
  24. S I Z E M AT T E R S

    #highperfandroid
  25. S I Z E M AT T E R S

    #highperfandroid
  26. S I Z E M AT T E R S

    #highperfandroid
  27. P E R F O R M A N C

    E S U M M A RY • Build Systems • Size matters • First impressions • Tools from Google #highperfandroid
  28. F I R S T I M P R E

    S S I O N S #highperfandroid
  29. F I R S T I M P R E

    S S I O N S #highperfandroid
  30. F I R S T I M P R E

    S S I O N S • compare against other apps (benchmark) • does not work on native code yet (many games) • nimbledroid.com — currently free #highperfandroid
  31. P E R F O R M A N C

    E S U M M A RY • Build Systems • Size matters • First impressions • Tools from Google #highperfandroid
  32. T O O L S F R O M G

    O O G L E • View Hierarchy Profiling (using Hierarchy Viewer) • Profile GPU Rendering • Overdraw Visualization • Systrace • Memory Monitor • Heap Viewer • Allocation Tracker #highperfandroid
  33. V I E W H I E R A R

    C H Y P R O F I L I N G #highperfandroid
  34. P R O F I L E G P U

    R E N D E R I N G #highperfandroid
  35. O V E R D R A W V I

    S U A L I Z AT I O N #highperfandroid
  36. M E M O RY M O N I T

    O R #highperfandroid
  37. H E A P V I E W E R

    #highperfandroid
  38. A L L O C AT I O N T

    R A C K E R #highperfandroid
  39. P E R F O R M A N C

    E S U M M A RY • Build Systems • Size matters • First impressions • Tools from Google #highperfandroid
  40. B E A U T I F U L S

    N O W F L A K E S
  41. P E R F O R M A N C

    E • Merriam Webster - “the execution of an action” • So what is “High Performance”? #highperformance
  42. H I G H P E R F O R

    M A N C E A N D R O I D M A R K S C H E E L ( @ 5 2 8 0 M A R K ) #highperfandroid Los Angeles, USA - August 20, 2015
  43. M A R K S C H E E L

    • @5280mark on Twitter • Open Source Contributions to google-glass and square • Colorado • digitalconstruction.com
  44. U P C O M I N G TA L

    K S • Big Android BBQ • 10/22-10/23, Dallas, TX • Denver Startup Week • 9/28 - 10/2 Denver, CO • Paris • November 2015 #highperfandroid
  45. F O L L O W M E O N

    T W I T T E R • @5280mark • let’s continue the conversation #highperfandroid