SlideShare a Scribd company logo
From minutes to seconds:
minimizing build 3mes
RENE GROESCHKE
GRADLE INC.
@JugHH
• René Gröschke
• Principal Engineer @ Gradle Inc.
• rene@gradle.com
• @breskeby
• github.com/breskeby
About me
• Intro
• General performance improvements
• Gradle Worker API
• Incremental builds & Compile avoidance
• Gradle Build Cache
• Deep build insights
Agenda
Downloads /
Month4.0M
Open-source
Projects

Worldwide
(TechCruch)
Top 20
Gradle 3-min intro
Gradle build execuIon
Gradle build scripts Execute tasks
2-phase build:
ConfiguraIon phase → build task graph
ExecuIon phase → execute task graph
Configure tasks
build.gradle
apply plugin: 'java-library'
repositories {
jcenter()
}
dependencies {
api 'org.apache.commons:commons-math3:3.6.1'
implementation 'com.google.guava:guava:21.0'
testImplementation 'junit:junit:4.12'
}
task greeting(type: DefaultTask) {
doLast {
println "Hallo Hamburg!”
}
}
Demo
Gradle 3-min intro
General performance
improvements
• Faster configuraIon Ime
• Parallel dependency downloads
• Parallel task / acIon execuIon by default
General performance improvements
Worker API
Worker API
• Previously tasks in different projects can run in parallel
• New API to run task acIons in single project in parallel safely
• Parallel acIons cannot mutate shared state
Example worker
import javax.inject.Inject
class ReverseFile implements Runnable {
File fileToReverse
File destinationFile
@Inject
public ReverseFile(File fileToReverse, File destinationFile) {
this.fileToReverse = fileToReverse
this.destinationFile = destinationFile
}
@Override
public void run() {
destinationFile.text = fileToReverse.text.reverse()
}
}
class ReverseFiles extends SourceTask {
final WorkerExecutor workerExecutor
@OutputDirectory
File outputDir
// The WorkerExecutor will be injected by Gradle at runtime
@Inject
public ReverseFiles(WorkerExecutor workerExecutor) {
this.workerExecutor = workerExecutor
}
@TaskAction
void reverseFiles() {
source.files.each { file ->
workerExecutor.submit(ReverseFile.class) { WorkerConfiguration config ->
// Use the minimum level of isolation
config.isolationMode = IsolationMode.NONE
// Constructor parameters for the unit of work implementation
config.params = [ file, project.file("${outputDir}/${file.name}") ]
}
}
}
}
Worker isolaIon levels
• NONE - runs in same process, minimum isolaIon
• CLASSLOADER - runs in same process with isolated
classloader
• PROCESS - runs in separate process, maximum isolaIon
Worker API resources
• Video of Gradle Summit presentaIon on worker API
• Worker API documentaIon
Incremental builds
The fastest task is the one you don’t need to execute

Only re-run tasks affected by changes made between build
execuIons
Incremental builds
Demo
Incremental builds
Compile avoidance &
incremental compiler
Save 3me by only recompiling the minimum number of source files
needed for a given change
Compile avoidance & incremental compiler
Compile avoidance
Project A Project B
MyInternalClass
recompile unchanged
Demo
Compile Avoidance
• Analyze class dependencies to opImize which classes are
recompiled
• Fast in-memory cache of class ABIs inside daemon
Incremental compiler
Enable incremental compiler
tasks.withType(JavaCompile) {
options.incremental = true
}
Compile avoidance & incremental compiler
Build cache
Build cache
• Gradle reuses results
• from last Ime
• when we ran this build
• on this machine
Build cache
• Why not
• from any3me
• when we ran any build
• anywhere
Demo
Build cache
Build cache
Remote
Cache
Local
Cache
CI
Developer
Build cache
buildCache {
local {
enabled = !isCI
}
remote(HttpBuildCache) {
url = "https://my.ge.server/cache/"
push = isCI
}
}
Build cache in Gradle build
• IntroducIon to build cache blog post
• Extensive guide on using the build cache and improving the
cacheability of your build
• User guide secIon on build cache
• Highly-performant, scalable build cache backend available in
Gradle Enterprise
• Build cache node Docker image
Build cache resources
Build scans
Build scans
• Details about build failures
• Visual Imeline of which tasks ran and in which order
• Details on why tasks were executed (up-to-date reasons)
• Which dependencies were used
• Performance analysis of configuraIon, execuIon, etc.
• Aaach custom data to your builds (Git commit, CI or local,
Checkstyle errors, etc.)
Deep insights into a build execution
Build scans
• Quickly idenIfy places in your build to opImize
• Find slowest tasks, long build configuraIon Ime, long
dependency download Imes, etc.
• See which tasks are and aren’t cacheable
• IdenIfy slowest tests
Improve build performance
Build scans
• Easily share exactly what happened in when your build ran
(tasks, tests, etc.)
• Build environment (JDK, OS, CLI switches, etc.)
• Share exact links to many different parts of the build scan
(specific task, test, dependency, console output line, etc.)
Collaborate with colleagues and the community
Build scans
Demo
• scans.gradle.com
• Get started with build scans
• Build scan plugin user manual
Build scan resources
Build scans are a free service for everyone!
Gradle Enterprise
Gradle Enterprise
• Build scans + search + comparison + (analyIcs)
• Scalable, high-performance build cache backend
• Hosted on-premise
Gradle Enterprise
Demo
• Gradle Enterprise is a commercial offering
• Learn more: gradle.com/enterprise
• Free trial at haps://gradle.com/enterprise/trial
Gradle Enterprise
• Incremental builds
• Build cache
• Compile avoidance & Incremental compiler
• Worker API
• Gradle Build Scans
• Gradle Enterprise
Summary
• IntroducIon to Gradle (Free online training class)
• Maximizing Developer ProducIvity with Gradle Enterprise
(Free online training class)
• Gegng-started and topic-based guides
• User documentaIon
• Gradle forums
AddiIonal resources
Careers @ Gradle Inc.
We’re Hiring!
Check at www.gradle.org
Engineering
Gradle BuildTool Software Engineer
Worldwide
Gradle Cloud Services Back-End Engineer
Worldwide
Gradle Cloud Services Front-End Engineer
Worldwide
Q & A
Thank you!
René Gröschke

More Related Content

What's hot

Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
indiver
 
Continuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket PipelinesContinuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket Pipelines
Atlassian
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
Md. Minhazul Haque
 
An introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesAn introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket Pipelines
Dave Clark
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
Anne Gentle
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
Mukta Aphale
 
Sppp presentation
Sppp presentationSppp presentation
Sppp presentation
Denis Molodtsov
 
DevOps best practices with OpenShift
DevOps best practices with OpenShiftDevOps best practices with OpenShift
DevOps best practices with OpenShift
Michael Lehmann
 
"Workstation Up" - Docker Development at Flow by Mike Roth
"Workstation Up" - Docker Development at Flow by Mike Roth"Workstation Up" - Docker Development at Flow by Mike Roth
"Workstation Up" - Docker Development at Flow by Mike Roth
Docker, Inc.
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid Cloud
Vlad Kuusk
 
CI is dead, long live CI
CI is dead, long live CICI is dead, long live CI
CI is dead, long live CI
Frédéric Lepied
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
Vinay H G
 
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and TestimSelenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Codefresh
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
Mukta Aphale
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
COMAQA.BY
 
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Docker, Inc.
 
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e JenkinsCriando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Camilo Ribeiro
 
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
DataArt
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
Dan MAGIER
 

What's hot (20)

Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Continuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket PipelinesContinuous Delivery in the Cloud with Bitbucket Pipelines
Continuous Delivery in the Cloud with Bitbucket Pipelines
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
An introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesAn introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket Pipelines
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
 
Sppp presentation
Sppp presentationSppp presentation
Sppp presentation
 
DevOps best practices with OpenShift
DevOps best practices with OpenShiftDevOps best practices with OpenShift
DevOps best practices with OpenShift
 
"Workstation Up" - Docker Development at Flow by Mike Roth
"Workstation Up" - Docker Development at Flow by Mike Roth"Workstation Up" - Docker Development at Flow by Mike Roth
"Workstation Up" - Docker Development at Flow by Mike Roth
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid Cloud
 
CI is dead, long live CI
CI is dead, long live CICI is dead, long live CI
CI is dead, long live CI
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and TestimSelenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
 
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
 
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e JenkinsCriando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
 
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
Дмитрий Иванов «Мое первое приложение в облаках или почему стоит использовать...
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 

Similar to Gradle - From minutes to seconds: minimizing build times

Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Developer Productivity Engineering with Gradle
Developer Productivity Engineering with GradleDeveloper Productivity Engineering with Gradle
Developer Productivity Engineering with Gradle
All Things Open
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
David Funaro
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
Azure Riyadh User Group
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
Jared Burrows
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases Weekly
RightScale
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Lean IT Consulting
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Theo Jungeblut
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon Web Services
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
Gert Drapers
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Amazon Web Services
 
Cypress report
Cypress reportCypress report
Cypress report
Adarsh
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
Md Jawed
 
#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned
Vincent Biret
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
Docker, Inc.
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
Peter Lindberg
 
Era of server less computing final
Era of server less computing finalEra of server less computing final
Era of server less computing final
Baskar rao Dsn
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earthPittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
Grace Jansen
 

Similar to Gradle - From minutes to seconds: minimizing build times (20)

Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Developer Productivity Engineering with Gradle
Developer Productivity Engineering with GradleDeveloper Productivity Engineering with Gradle
Developer Productivity Engineering with Gradle
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
 
Continuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases WeeklyContinuous Delivery: How RightScale Releases Weekly
Continuous Delivery: How RightScale Releases Weekly
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
Cypress report
Cypress reportCypress report
Cypress report
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
Era of server less computing final
Era of server less computing finalEra of server less computing final
Era of server less computing final
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earthPittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
 

Recently uploaded

DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Semiosis Software Private Limited
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 

Recently uploaded (20)

DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 

Gradle - From minutes to seconds: minimizing build times

  • 1. From minutes to seconds: minimizing build 3mes RENE GROESCHKE GRADLE INC. @JugHH
  • 2. • René Gröschke • Principal Engineer @ Gradle Inc. • rene@gradle.com • @breskeby • github.com/breskeby About me
  • 3. • Intro • General performance improvements • Gradle Worker API • Incremental builds & Compile avoidance • Gradle Build Cache • Deep build insights Agenda
  • 7. Gradle build execuIon Gradle build scripts Execute tasks 2-phase build: ConfiguraIon phase → build task graph ExecuIon phase → execute task graph Configure tasks
  • 8. build.gradle apply plugin: 'java-library' repositories { jcenter() } dependencies { api 'org.apache.commons:commons-math3:3.6.1' implementation 'com.google.guava:guava:21.0' testImplementation 'junit:junit:4.12' } task greeting(type: DefaultTask) { doLast { println "Hallo Hamburg!” } }
  • 11. • Faster configuraIon Ime • Parallel dependency downloads • Parallel task / acIon execuIon by default General performance improvements
  • 13. Worker API • Previously tasks in different projects can run in parallel • New API to run task acIons in single project in parallel safely • Parallel acIons cannot mutate shared state
  • 14. Example worker import javax.inject.Inject class ReverseFile implements Runnable { File fileToReverse File destinationFile @Inject public ReverseFile(File fileToReverse, File destinationFile) { this.fileToReverse = fileToReverse this.destinationFile = destinationFile } @Override public void run() { destinationFile.text = fileToReverse.text.reverse() } }
  • 15. class ReverseFiles extends SourceTask { final WorkerExecutor workerExecutor @OutputDirectory File outputDir // The WorkerExecutor will be injected by Gradle at runtime @Inject public ReverseFiles(WorkerExecutor workerExecutor) { this.workerExecutor = workerExecutor } @TaskAction void reverseFiles() { source.files.each { file -> workerExecutor.submit(ReverseFile.class) { WorkerConfiguration config -> // Use the minimum level of isolation config.isolationMode = IsolationMode.NONE // Constructor parameters for the unit of work implementation config.params = [ file, project.file("${outputDir}/${file.name}") ] } } } }
  • 16. Worker isolaIon levels • NONE - runs in same process, minimum isolaIon • CLASSLOADER - runs in same process with isolated classloader • PROCESS - runs in separate process, maximum isolaIon
  • 17. Worker API resources • Video of Gradle Summit presentaIon on worker API • Worker API documentaIon
  • 19. The fastest task is the one you don’t need to execute
 Only re-run tasks affected by changes made between build execuIons Incremental builds
  • 22. Save 3me by only recompiling the minimum number of source files needed for a given change Compile avoidance & incremental compiler
  • 23. Compile avoidance Project A Project B MyInternalClass recompile unchanged
  • 25. • Analyze class dependencies to opImize which classes are recompiled • Fast in-memory cache of class ABIs inside daemon Incremental compiler
  • 27. Compile avoidance & incremental compiler
  • 29. Build cache • Gradle reuses results • from last Ime • when we ran this build • on this machine
  • 30. Build cache • Why not • from any3me • when we ran any build • anywhere
  • 33. Build cache buildCache { local { enabled = !isCI } remote(HttpBuildCache) { url = "https://my.ge.server/cache/" push = isCI } }
  • 34. Build cache in Gradle build
  • 35. • IntroducIon to build cache blog post • Extensive guide on using the build cache and improving the cacheability of your build • User guide secIon on build cache • Highly-performant, scalable build cache backend available in Gradle Enterprise • Build cache node Docker image Build cache resources
  • 37. Build scans • Details about build failures • Visual Imeline of which tasks ran and in which order • Details on why tasks were executed (up-to-date reasons) • Which dependencies were used • Performance analysis of configuraIon, execuIon, etc. • Aaach custom data to your builds (Git commit, CI or local, Checkstyle errors, etc.) Deep insights into a build execution
  • 38. Build scans • Quickly idenIfy places in your build to opImize • Find slowest tasks, long build configuraIon Ime, long dependency download Imes, etc. • See which tasks are and aren’t cacheable • IdenIfy slowest tests Improve build performance
  • 39. Build scans • Easily share exactly what happened in when your build ran (tasks, tests, etc.) • Build environment (JDK, OS, CLI switches, etc.) • Share exact links to many different parts of the build scan (specific task, test, dependency, console output line, etc.) Collaborate with colleagues and the community
  • 41. • scans.gradle.com • Get started with build scans • Build scan plugin user manual Build scan resources Build scans are a free service for everyone!
  • 43. Gradle Enterprise • Build scans + search + comparison + (analyIcs) • Scalable, high-performance build cache backend • Hosted on-premise
  • 45. • Gradle Enterprise is a commercial offering • Learn more: gradle.com/enterprise • Free trial at haps://gradle.com/enterprise/trial Gradle Enterprise
  • 46. • Incremental builds • Build cache • Compile avoidance & Incremental compiler • Worker API • Gradle Build Scans • Gradle Enterprise Summary
  • 47. • IntroducIon to Gradle (Free online training class) • Maximizing Developer ProducIvity with Gradle Enterprise (Free online training class) • Gegng-started and topic-based guides • User documentaIon • Gradle forums AddiIonal resources
  • 48. Careers @ Gradle Inc. We’re Hiring! Check at www.gradle.org Engineering Gradle BuildTool Software Engineer Worldwide Gradle Cloud Services Back-End Engineer Worldwide Gradle Cloud Services Front-End Engineer Worldwide
  • 49. Q & A