SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Accelerating the Android Platform Build
David Rosen, Product Manager
drosen@electric-cloud.com
@adr0sen
OnAndroidConf 2013
What’s this Android buzz all about?

2
Qualcomm Reference Design Program
<60 days TTM, and pushing for faster

Source: http://www.qualcomm.com/connect/analyst-relations/events/americas-analyst-summit-2012
Android Development Landscape
Real-world challenges at large APAC mobile device maker
Electric Cloud Android/Embedded Survey (Q1 2013)

Users of Android by Vertical

• Survey
• Focused on Android
development & delivery

Military/aero
space
3%

Other
25%

• Global embedded contacts in
Electric Cloud marketing lists
• 350+ respondents
• 175+ Android

Automotive
6%

Mobile
38%
Medical
4%

Industrial
control and
automation
6%

Consumer
electronics
18%
Android Delivery Process Today
Technical Challenges

Negative Business Impacts

• Slow Android Builds
• Slow, Complex CTS
Testing
• Complex B-T-R Matrix
• Custom Testing –
Volume, Complexity

• Slow Time to Market
• Poor Quality of products
• Poor productivity of
teams

Avg. release build time
More than 4
hours, 15.3
%

1-4
hours, 27.0
%

Avg. time to execute CTS
Less than 5
minutes, 7.8
%

5-20
minutes, 21.
0%
20 minutes 1
hour, 28.8%

4-8
hours, 15.0
%

More than 8
hours, 5.0%

Less than 1
hour, 22.5%

1-4
hours, 57.5
%
Accelerating the
Android build
Why look at Android builds?

• Android is everywhere
• 68% of global mobile phone market share1
• Explosion of non-phone applications
•
•
•
•

Automotive (Saab, Renault)
Entertainment (Ouya, Nvidia)
Exercise equipment (NordicTrack)
Rice cookers! (Panasonic)

• Android is everywhere
• … and that means thousands of developers building Android

• What if we can make those builds faster?
• How would your development process change?
• How much more could you achieve?

1

Source: Gartner, February 2013
What is (and is not) covered in this part of the talk?

• Build acceleration techniques fall into two broad categories:
• Hardware improvements like faster CPU’s and better disks
• Software improvements like smarter build tools and faster compilers

• In general, hardware and software improvements are complimentary
• If you want the fastest possible builds, leverage both!

• This talk is about software techniques for build acceleration
• Given a fixed hardware platform, how fast can we build Android?
• Or, what do you do when you reach the limits of your hardware?
AOSP LOC Evolution
Jan 2009 – Jan 20131
18,000,000

16,000,000

14,000,000

12,000,000

10,000,000
Linux Kernel
8,000,000

Android

Mozilla Firefox
6,000,000

4,000,000

2,000,000

0

1

Source: http://www.ohloh.net, http://en.wikipedia.org/wiki/Android_version_history (February 2013)

Chromium
Webkit
AOSP Build Evolution
Release Date

LOC1

LOC
Growth %

GNU Make
Build Time2

Build Time
Growth %

2.2

May 2010

8,837,858

-

28m55s

-

2.3.4

April 2011

11,492,324

30%

33m10s

15%

4.0.1

October 2011

12,827,330

12%

1h13m54s

123%

4.1.1

July 2012

15,028,331

17%

1h28m11s

19%

4.2.2

February 2013

15,266,8033

2%

1h32m56s

2%

01:40
+19%

+2%

18
16

01:26

+123%
+30%

01:12

+17%

+2%

14
12

+12%
00:57

10

00:43

8
6

00:28

+15%

4

00:14

2

00:00

0

2.2
1

Millions

Android Version

2.3.4

4.0.1

4.1.1

4.2.2

http://www.ohloh.net, 2 Builds performed on 8-core 16GB RAM server, 3 LOC data as of December 2012

Build Time

LOC
Common wisdom about Android builds

• I can just…
• … add more cores
• … use distcc
• … use ccache

• “The Android build is as optimized as it can be!”
The common wisdom is wrong.
Sidebar: how much faster is “interesting”?

• Some large mobile device makers run > 50K builds/week
• At 15 minutes per build that’s 12,500 hours of build time
• A reduction of just one minute would save 800 hours every week

• What about wait time?

• Faster builds = more iterations
• Faster builds = higher quality
• Faster builds = lower time to market
How fast is GNU make?

• Best time: ~15m
• 48-cores
• 128GB RAM
Problem: Visibility

• Knowing the end-to-end time is great but not actionable
• We need visibility
• Where is the time going?
• What are the bottlenecks?
• Are there opportunities for improvement?

• How do we get that visibility?
• Instrument the build… somehow! strace, echo, hack gmake, or…

• ElectricInsight
• Visualization and analysis of builds run with ElectricMake
• Let’s pump this build through emake and see how it looks!
Solution: ElectricInsight
What can we see from here?

• An ideal build would look like a tightly packed box
• Overall looks almost perfect – well done, Android team!
• But! a couple of things stand out:
• Crazy long parse time1
• Gaps at the end of the build, indicative of serializations
• Some very long serial chunks at the bottom of graph

• We’ll investigate these issues, but first: what if we just use
more cores?
1

emake parsing may be slower than gmake parsing
Longest serial chain
Best possible is about 15m

• Best possible runtime is about 15m
Projected runtime with more cores
What else can we learn?
• Lots of non-compile work in the build - ~25% of total time
Problem: long parse time

• Why do we build?
• To transform sources into deliverables (programs, docs, etc).

• Does parsing makefiles transform sources into
deliverables?
• Nope.

• Parsing makefiles is pure overhead
• But you have to tell make what to do somehow
• Unless you want to manually invoke the compiler, linker, etc.
Solution: parse avoidance

• What if we don’t parse (every time)?
• Makefiles don’t change very often, so why reparse every time?

• Reuse parse results from a previous build, as long as…
• Makefiles are unchanged (MD5)
• Command-line is unchanged
• Environment is unchanged

• How do we do it?
• Electric Make already has parse results in a reloadable form, just
need to add cache management
• GNU make doesn’t, but could be modified
Parse avoidance impact
Build time reduced to about 13m30s
Problem: serializations

• Gaps in visualization suggest serializations
• Q: How many dependencies are there in the
Android build?
• A: More than you think!
Android Dependency Graph

• Dump all makefile rules
• 100,000 files/targets
• 1,990,628 dependencies
Dependencies in Android

• ~19 dependencies per file: why so many?
• Consider a typical build structure:
lib.a: foo.o bar.o
foo.o: foo.c foo.h util.h
bar.o: bar.c bar.h util.h

• Some files will have many dependencies
• Most have only a few
• What is going on in Android?
Superfluous dependencies in Android

• Do we really need all 1.9M dependencies?
• The filesystem can tell us!
• Collect a list of files actually used to generate a target
• Compare to the list of prerequisites specified in the makefile

• Example:
foo.txt:
echo “Hello” > foo.txt
bar.txt: foo.txt
echo “World” > bar.txt

• Why not run foo.txt and bar.txt in parallel?
Actual dependencies in Android

• 100,000 files/targets
• 288,804 dependencies
Specified vs. Actual dependencies in Android

Specified

Actual
Solution: dependency optimization

• Impossible to manually eliminate superfluous
dependencies
• Electric Make can prune them automatically
• If you use gmake, you can achieve the same effect:
• Remove existing dependency specifications
• Generate minimal dependency specifications from emake data
• Before:
$(OBJECTS): %.o: %.cpp $(ALL_HEADERS) $(OTHER_DEPS)
$(COMPILE.CC)

• After:
$(OBJECTS): %.o: %.cpp
$(COMPILE.CC)
foo.o: foo.h util.h
bar.o: bar.h util.h generated.h
Dependency optimization impact
Build time reduced to about 12m30s
Problem: long serial jobs

• Long serial jobs prohibits further parallelization
• Dominates longest serial chain:

• In Android, Javadoc generation is a performance albatross
• Typically a long, monolithic job
• Not decomposable/parallelizable, not incremental
Solution: Javadoc Caching

• Javadoc generation can be cached
• Stash output after running javadoc
• Reuse output in future builds if inputs match
• Like ccache, but for javadoc

Carving 4 minutes away from job!
Javadoc Caching impact
Build time reduced to about 9m30s
Summary
• Google has done a great job of optimizing Android builds
• But there’s still room for improvement!
• By caching parse results and javadoc output while pruning
dependencies, we have shown to carve off 5m+ or ~37% from build
21:36
19:30
17:45

19:12
16:48

15:00
14:24

15:00

12:00
11:55

Gmake

09:36

Emake
09:30

07:12
04:48
02:24
00:00
24

32

48
Questions?
David Rosen, Product Manager
drosen@electric-cloud.com
@adr0sen
http://www.electric-cloud.com/eade

Weitere ähnliche Inhalte

Was ist angesagt?

Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...Andreas Grabner
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsAndreas Grabner
 
Devops at Netflix (re:Invent)
Devops at Netflix (re:Invent)Devops at Netflix (re:Invent)
Devops at Netflix (re:Invent)Jeremy Edberg
 
Top Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your PipelineTop Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your PipelineAndreas Grabner
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Andreas Grabner
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyAndreas Grabner
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!Andreas Grabner
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersAndreas Grabner
 
OOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The WorldOOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The WorldAndreas Grabner
 
A Prophet in Production Shiri Hochhauser
A Prophet in Production   Shiri HochhauserA Prophet in Production   Shiri Hochhauser
A Prophet in Production Shiri HochhauserDevOpsDays Tel Aviv
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsAndreas Grabner
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance MetricsAndreas Grabner
 
Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014Andreas Grabner
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your momAndreas Grabner
 
Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014royrapoport
 
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your PipelineMetrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your PipelineAndreas Grabner
 
Canary Analyze All the Things
Canary Analyze All the ThingsCanary Analyze All the Things
Canary Analyze All the Thingsroyrapoport
 
Chaos Engineering when you're not Netflix
Chaos Engineering when you're not NetflixChaos Engineering when you're not Netflix
Chaos Engineering when you're not NetflixMartez Reed
 
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...DevOpsDays Tel Aviv
 

Was ist angesagt? (20)

Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance Problems
 
Devops at Netflix (re:Invent)
Devops at Netflix (re:Invent)Devops at Netflix (re:Invent)
Devops at Netflix (re:Invent)
 
Top Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your PipelineTop Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your Pipeline
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
 
OOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The WorldOOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The World
 
A Prophet in Production Shiri Hochhauser
A Prophet in Production   Shiri HochhauserA Prophet in Production   Shiri Hochhauser
A Prophet in Production Shiri Hochhauser
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance Metrics
 
Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your mom
 
(R)evolutionize APM
(R)evolutionize APM(R)evolutionize APM
(R)evolutionize APM
 
Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014
 
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your PipelineMetrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
 
Canary Analyze All the Things
Canary Analyze All the ThingsCanary Analyze All the Things
Canary Analyze All the Things
 
Chaos Engineering when you're not Netflix
Chaos Engineering when you're not NetflixChaos Engineering when you're not Netflix
Chaos Engineering when you're not Netflix
 
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...
(Ignite) JOURNEY OF CHAOS EXPERIMENT EXECUTION IN PRODUCTION - LEONID HAIMOV,...
 

Andere mochten auch

User Experience Testing in Your RFP Process - David Rosen - highedweb 2014
User Experience Testing in Your RFP Process  - David Rosen - highedweb 2014User Experience Testing in Your RFP Process  - David Rosen - highedweb 2014
User Experience Testing in Your RFP Process - David Rosen - highedweb 2014David Rosen
 
APEC-SCSC-Trisakti University-Syamsir Abduh
APEC-SCSC-Trisakti University-Syamsir AbduhAPEC-SCSC-Trisakti University-Syamsir Abduh
APEC-SCSC-Trisakti University-Syamsir AbduhTrisakti University
 
Investor Day 2009 - Regional business presentation Belgium
Investor Day 2009 - Regional business presentation BelgiumInvestor Day 2009 - Regional business presentation Belgium
Investor Day 2009 - Regional business presentation BelgiumAgeas
 
9M results 2014 - Presentation Analysts and institutional investors
9M results 2014 - Presentation Analysts and institutional investors9M results 2014 - Presentation Analysts and institutional investors
9M results 2014 - Presentation Analysts and institutional investorsAgeas
 
Investor Day 2012 - The Way Forward to 2015
Investor Day 2012 - The Way Forward to 2015Investor Day 2012 - The Way Forward to 2015
Investor Day 2012 - The Way Forward to 2015Ageas
 
Hmrc New Qrops List April 2012
Hmrc New Qrops List April 2012Hmrc New Qrops List April 2012
Hmrc New Qrops List April 2012nadinemohr555
 
2013 CCIFTBD
2013 CCIFTBD2013 CCIFTBD
2013 CCIFTBDCcift11
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD
 

Andere mochten auch (11)

nihms 2015
nihms 2015 nihms 2015
nihms 2015
 
User Experience Testing in Your RFP Process - David Rosen - highedweb 2014
User Experience Testing in Your RFP Process  - David Rosen - highedweb 2014User Experience Testing in Your RFP Process  - David Rosen - highedweb 2014
User Experience Testing in Your RFP Process - David Rosen - highedweb 2014
 
APEC-SCSC-Trisakti University-Syamsir Abduh
APEC-SCSC-Trisakti University-Syamsir AbduhAPEC-SCSC-Trisakti University-Syamsir Abduh
APEC-SCSC-Trisakti University-Syamsir Abduh
 
Uopx Alumni Business Listing
Uopx Alumni Business ListingUopx Alumni Business Listing
Uopx Alumni Business Listing
 
Investor Day 2009 - Regional business presentation Belgium
Investor Day 2009 - Regional business presentation BelgiumInvestor Day 2009 - Regional business presentation Belgium
Investor Day 2009 - Regional business presentation Belgium
 
Ubi global study 2013 content list
Ubi global study 2013 content listUbi global study 2013 content list
Ubi global study 2013 content list
 
9M results 2014 - Presentation Analysts and institutional investors
9M results 2014 - Presentation Analysts and institutional investors9M results 2014 - Presentation Analysts and institutional investors
9M results 2014 - Presentation Analysts and institutional investors
 
Investor Day 2012 - The Way Forward to 2015
Investor Day 2012 - The Way Forward to 2015Investor Day 2012 - The Way Forward to 2015
Investor Day 2012 - The Way Forward to 2015
 
Hmrc New Qrops List April 2012
Hmrc New Qrops List April 2012Hmrc New Qrops List April 2012
Hmrc New Qrops List April 2012
 
2013 CCIFTBD
2013 CCIFTBD2013 CCIFTBD
2013 CCIFTBD
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
 

Ähnlich wie OnAndroidConf 2013: Accelerating the Android Platform Build

Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimizationwipjam
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsTechWell
 
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Sacha Leprêtre
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceTim Callaghan
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
Framework and Application Benchmarking
Framework and Application BenchmarkingFramework and Application Benchmarking
Framework and Application BenchmarkingPaul Jones
 
Static Code Analysis and AutoLint
Static Code Analysis and AutoLintStatic Code Analysis and AutoLint
Static Code Analysis and AutoLintLeander Hasty
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in productionNETFest
 
Convince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilConvince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilVadym Kazulkin
 
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013Andreas Grabner
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...NCCOMMS
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationKyle Hailey
 
Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Massimo Sgrelli
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Vadym Kazulkin
 

Ähnlich wie OnAndroidConf 2013: Accelerating the Android Platform Build (20)

Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimization
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB Performance
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Android Lollipop
Android LollipopAndroid Lollipop
Android Lollipop
 
Framework and Application Benchmarking
Framework and Application BenchmarkingFramework and Application Benchmarking
Framework and Application Benchmarking
 
Static Code Analysis and AutoLint
Static Code Analysis and AutoLintStatic Code Analysis and AutoLint
Static Code Analysis and AutoLint
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
 
Convince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilConvince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week Brazil
 
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
 

Kürzlich hochgeladen

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 

Kürzlich hochgeladen (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 

OnAndroidConf 2013: Accelerating the Android Platform Build

  • 1. Accelerating the Android Platform Build David Rosen, Product Manager drosen@electric-cloud.com @adr0sen OnAndroidConf 2013
  • 2. What’s this Android buzz all about? 2
  • 3. Qualcomm Reference Design Program <60 days TTM, and pushing for faster Source: http://www.qualcomm.com/connect/analyst-relations/events/americas-analyst-summit-2012
  • 4. Android Development Landscape Real-world challenges at large APAC mobile device maker
  • 5. Electric Cloud Android/Embedded Survey (Q1 2013) Users of Android by Vertical • Survey • Focused on Android development & delivery Military/aero space 3% Other 25% • Global embedded contacts in Electric Cloud marketing lists • 350+ respondents • 175+ Android Automotive 6% Mobile 38% Medical 4% Industrial control and automation 6% Consumer electronics 18%
  • 6. Android Delivery Process Today Technical Challenges Negative Business Impacts • Slow Android Builds • Slow, Complex CTS Testing • Complex B-T-R Matrix • Custom Testing – Volume, Complexity • Slow Time to Market • Poor Quality of products • Poor productivity of teams Avg. release build time More than 4 hours, 15.3 % 1-4 hours, 27.0 % Avg. time to execute CTS Less than 5 minutes, 7.8 % 5-20 minutes, 21. 0% 20 minutes 1 hour, 28.8% 4-8 hours, 15.0 % More than 8 hours, 5.0% Less than 1 hour, 22.5% 1-4 hours, 57.5 %
  • 8. Why look at Android builds? • Android is everywhere • 68% of global mobile phone market share1 • Explosion of non-phone applications • • • • Automotive (Saab, Renault) Entertainment (Ouya, Nvidia) Exercise equipment (NordicTrack) Rice cookers! (Panasonic) • Android is everywhere • … and that means thousands of developers building Android • What if we can make those builds faster? • How would your development process change? • How much more could you achieve? 1 Source: Gartner, February 2013
  • 9. What is (and is not) covered in this part of the talk? • Build acceleration techniques fall into two broad categories: • Hardware improvements like faster CPU’s and better disks • Software improvements like smarter build tools and faster compilers • In general, hardware and software improvements are complimentary • If you want the fastest possible builds, leverage both! • This talk is about software techniques for build acceleration • Given a fixed hardware platform, how fast can we build Android? • Or, what do you do when you reach the limits of your hardware?
  • 10. AOSP LOC Evolution Jan 2009 – Jan 20131 18,000,000 16,000,000 14,000,000 12,000,000 10,000,000 Linux Kernel 8,000,000 Android Mozilla Firefox 6,000,000 4,000,000 2,000,000 0 1 Source: http://www.ohloh.net, http://en.wikipedia.org/wiki/Android_version_history (February 2013) Chromium Webkit
  • 11. AOSP Build Evolution Release Date LOC1 LOC Growth % GNU Make Build Time2 Build Time Growth % 2.2 May 2010 8,837,858 - 28m55s - 2.3.4 April 2011 11,492,324 30% 33m10s 15% 4.0.1 October 2011 12,827,330 12% 1h13m54s 123% 4.1.1 July 2012 15,028,331 17% 1h28m11s 19% 4.2.2 February 2013 15,266,8033 2% 1h32m56s 2% 01:40 +19% +2% 18 16 01:26 +123% +30% 01:12 +17% +2% 14 12 +12% 00:57 10 00:43 8 6 00:28 +15% 4 00:14 2 00:00 0 2.2 1 Millions Android Version 2.3.4 4.0.1 4.1.1 4.2.2 http://www.ohloh.net, 2 Builds performed on 8-core 16GB RAM server, 3 LOC data as of December 2012 Build Time LOC
  • 12. Common wisdom about Android builds • I can just… • … add more cores • … use distcc • … use ccache • “The Android build is as optimized as it can be!”
  • 13. The common wisdom is wrong.
  • 14. Sidebar: how much faster is “interesting”? • Some large mobile device makers run > 50K builds/week • At 15 minutes per build that’s 12,500 hours of build time • A reduction of just one minute would save 800 hours every week • What about wait time? • Faster builds = more iterations • Faster builds = higher quality • Faster builds = lower time to market
  • 15. How fast is GNU make? • Best time: ~15m • 48-cores • 128GB RAM
  • 16. Problem: Visibility • Knowing the end-to-end time is great but not actionable • We need visibility • Where is the time going? • What are the bottlenecks? • Are there opportunities for improvement? • How do we get that visibility? • Instrument the build… somehow! strace, echo, hack gmake, or… • ElectricInsight • Visualization and analysis of builds run with ElectricMake • Let’s pump this build through emake and see how it looks!
  • 18. What can we see from here? • An ideal build would look like a tightly packed box • Overall looks almost perfect – well done, Android team! • But! a couple of things stand out: • Crazy long parse time1 • Gaps at the end of the build, indicative of serializations • Some very long serial chunks at the bottom of graph • We’ll investigate these issues, but first: what if we just use more cores? 1 emake parsing may be slower than gmake parsing
  • 19. Longest serial chain Best possible is about 15m • Best possible runtime is about 15m
  • 21. What else can we learn? • Lots of non-compile work in the build - ~25% of total time
  • 22. Problem: long parse time • Why do we build? • To transform sources into deliverables (programs, docs, etc). • Does parsing makefiles transform sources into deliverables? • Nope. • Parsing makefiles is pure overhead • But you have to tell make what to do somehow • Unless you want to manually invoke the compiler, linker, etc.
  • 23. Solution: parse avoidance • What if we don’t parse (every time)? • Makefiles don’t change very often, so why reparse every time? • Reuse parse results from a previous build, as long as… • Makefiles are unchanged (MD5) • Command-line is unchanged • Environment is unchanged • How do we do it? • Electric Make already has parse results in a reloadable form, just need to add cache management • GNU make doesn’t, but could be modified
  • 24. Parse avoidance impact Build time reduced to about 13m30s
  • 25. Problem: serializations • Gaps in visualization suggest serializations • Q: How many dependencies are there in the Android build? • A: More than you think!
  • 26. Android Dependency Graph • Dump all makefile rules • 100,000 files/targets • 1,990,628 dependencies
  • 27. Dependencies in Android • ~19 dependencies per file: why so many? • Consider a typical build structure: lib.a: foo.o bar.o foo.o: foo.c foo.h util.h bar.o: bar.c bar.h util.h • Some files will have many dependencies • Most have only a few • What is going on in Android?
  • 28. Superfluous dependencies in Android • Do we really need all 1.9M dependencies? • The filesystem can tell us! • Collect a list of files actually used to generate a target • Compare to the list of prerequisites specified in the makefile • Example: foo.txt: echo “Hello” > foo.txt bar.txt: foo.txt echo “World” > bar.txt • Why not run foo.txt and bar.txt in parallel?
  • 29. Actual dependencies in Android • 100,000 files/targets • 288,804 dependencies
  • 30. Specified vs. Actual dependencies in Android Specified Actual
  • 31. Solution: dependency optimization • Impossible to manually eliminate superfluous dependencies • Electric Make can prune them automatically • If you use gmake, you can achieve the same effect: • Remove existing dependency specifications • Generate minimal dependency specifications from emake data • Before: $(OBJECTS): %.o: %.cpp $(ALL_HEADERS) $(OTHER_DEPS) $(COMPILE.CC) • After: $(OBJECTS): %.o: %.cpp $(COMPILE.CC) foo.o: foo.h util.h bar.o: bar.h util.h generated.h
  • 32. Dependency optimization impact Build time reduced to about 12m30s
  • 33. Problem: long serial jobs • Long serial jobs prohibits further parallelization • Dominates longest serial chain: • In Android, Javadoc generation is a performance albatross • Typically a long, monolithic job • Not decomposable/parallelizable, not incremental
  • 34. Solution: Javadoc Caching • Javadoc generation can be cached • Stash output after running javadoc • Reuse output in future builds if inputs match • Like ccache, but for javadoc Carving 4 minutes away from job!
  • 35. Javadoc Caching impact Build time reduced to about 9m30s
  • 36. Summary • Google has done a great job of optimizing Android builds • But there’s still room for improvement! • By caching parse results and javadoc output while pruning dependencies, we have shown to carve off 5m+ or ~37% from build 21:36 19:30 17:45 19:12 16:48 15:00 14:24 15:00 12:00 11:55 Gmake 09:36 Emake 09:30 07:12 04:48 02:24 00:00 24 32 48
  • 37. Questions? David Rosen, Product Manager drosen@electric-cloud.com @adr0sen http://www.electric-cloud.com/eade

Hinweis der Redaktion

  1. Point out that axis is time in minutes, rows are cores/threads, boxes are individual targets