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

E552215dd726801c644470feae8bb41c?s=47 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

E552215dd726801c644470feae8bb41c?s=128

mscheel

August 20, 2015
Tweet

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. None
  5. 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
  6. B U I L D S Y S T E

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

    M S #consistable
  8. None
  9. 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
  10. 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
  11. VA G R A N T • Learn more at

    vagrantup.com • $ vagrant up • $ vagrant ssh • $ vagrant halt • $vagrant destroy #consistable
  12. None
  13. 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
  14. None
  15. 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
  16. None
  17. 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
  18. 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
  19. 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
  20. None
  21. 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
  22. D O C K E R • Build, Ship, Run

    • Make your SysAdmin or Ops guy happy • Great for apps with distributed resources
  23. D O C K E R #consistable

  24. #consistable

  25. 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
  26. 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
  27. 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
  28. #consistable

  29. 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
  30. 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
  31. S I Z E M AT T E R S

    #highperfandroid
  32. 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
  33. S I Z E M AT T E R S

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

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

    #highperfandroid
  36. 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
  37. F I R S T I M P R E

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

    S S I O N S #highperfandroid
  39. 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
  40. 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
  41. 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
  42. V I E W H I E R A R

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

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

    S U A L I Z AT I O N #highperfandroid
  45. S Y S T R A C E #highperfandroid

  46. M E M O RY M O N I T

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

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

    R A C K E R #highperfandroid
  49. 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
  50. B E A U T I F U L S

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

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

    M A N C E
  53. 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
  54. M A R K S C H E E L

    • @5280mark on Twitter • Open Source Contributions to google-glass and square • Colorado • digitalconstruction.com
  55. 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
  56. F O L L O W M E O N

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