SlideShare uma empresa Scribd logo
1 de 63
Baixar para ler offline
Why is my build
times so long?
1 / 63
My name is Kevin
I like community
organizing
and biking 🚴
2 / 63
Who here has tried
waiting for your
computer/CI to finish
the build?
3 / 63
I don't like waiting
4 / 63
What is long build
times?
5 / 63
waiting == less
productivitiy
less productivity == less
money
less money == you die
6 / 63
builds are inevitable
7 / 63
8 / 63
Build time scales
linearly
Time
Buildtime
9 / 63
We are building
bigger and better
apps
10 / 63
Companies have
bigger engineering
teams than ever
11 / 63
✅Consistent builds
12 / 63
✅Docker 🐳
13 / 63
So how we used to
solve it:
14 / 63
Wait on machines getting
faster aka.
Moore's law
15 / 63
2 techniques we can
use:
16 / 63
1. Caching
2. Do less
(3. Optimize)
17 / 63
Everyone uses
webpack
18 / 63
Wait!? Let's look if they
already solved it!
19 / 63
20 / 63
1. Caching
There are only two hard things
in Computer Science: cache
invalidation and naming
things. -- Phil Karlton
21 / 63
Knowing what has
been cached and has
not
22 / 63
Saving and retriving
cache
23 / 63
2. Do less
Removing code so that it
doesn't get run
24 / 63
Using multiple
repositories
25 / 63
The problem is:
collaborations
problems
26 / 63
There is a difference:
your company code !=
open source code
27 / 63
Example:
28 / 63
Project A + UI library
2 min | 2 min
29 / 63
Project A
UI Library
30 / 63
Project A
Project B
UI Library
31 / 63
Project A
Project B
UI Library v.1
32 / 63
Project A v.1
Project B v.1
UI Library v.1
33 / 63
Project A v.1
Project B v.1.1
UI Library v.1.1
34 / 63
Project A v.1.2
Project B v.1.1
UI Library v.1.2
35 / 63
Project A v.1.2
Project B v.2
UI Library v.2
36 / 63
NIGHTMARE!
37 / 63
That is why public
packages
left-pad?
38 / 63
So how do we solve
it?
39 / 63
We need a tool that:
- define
dependencies
- watch files changes
- language agnostic
40 / 63
projectA/
index.js
projectB/
index.js
projectC/
index.js
library/
lib.js
41 / 63
projectA/
index.js*
projectB/
index.js
projectC/
index.js
library/
lib.js
42 / 63
projectA/
index.js*
projectB/
index.js
projectC/
index.js
library/
lib.js
Builds started:
- projectA ...
43 / 63
What if a library
change?
44 / 63
projectA/
index.js
projectB/
index.js
projectC/
index.js
library/
lib.js*
Builds started:
- library ...
- projectA ...
- projectB ...
- projectC ...
45 / 63
Watch files changes
It tracks content of file
46 / 63
bazel.build can help
with that
47 / 63
copenhagenjs.dk uses
it
48 / 63
at first I didn't
understand
49 / 63
Bazel is also weird!
JavaScript is not 1st
class citizen!?
50 / 63
Python like Syntax
genrule(
name = "build",
srcs = ["server.js"],
cmd = "cat $< > $@",
outs = ["server.min.js"]
)
51 / 63
Great rules:
- Not allowed to
depend on ".."
- Copies files to
temporary folder
52 / 63
src/
index.js
⇣
temp/
# puts files here!
⇣
output/
# detects if you write to here!
53 / 63
It doesn't allow
circular dependencies
A -> B -> A
54 / 63
Automatically
Output of one task ->
input next task
55 / 63
genrule(
...
outs = ["build.tar.gz"],
)
genrule(
srcs = ["build.tar.gz", "firebase.json"],
...
)
56 / 63
Future for me:
- Store the state on
S3 or GCS
57 / 63
No more ✅:
Change 1 line in
markdown
All JavaScript tests
run!
58 / 63
Don't accept slow
builds!
Don't accept terrible
collaboration!
59 / 63
Do break up your
builds to many small
builds
Do encourage
collaboration!
60 / 63
I really encourage you
to use Bazel
Even seniors are
juniors with bazel
61 / 63
Thank you!
Questions?
Check out
kevinsimper.dk
62 / 63
63 / 63

Mais conteúdo relacionado

Semelhante a Why is my build times so long?

Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockScyllaDB
 
Contents_KiCad 6 Like A Pro – Projects.pdf
Contents_KiCad 6 Like A Pro – Projects.pdfContents_KiCad 6 Like A Pro – Projects.pdf
Contents_KiCad 6 Like A Pro – Projects.pdfLeonardo Hernandez
 
Successful Software Development with Apache Cassandra
Successful Software Development with Apache CassandraSuccessful Software Development with Apache Cassandra
Successful Software Development with Apache Cassandrazznate
 
Cassandra Summit 2014: Successful Software Development with Apache Cassandra
Cassandra Summit 2014: Successful Software Development with Apache CassandraCassandra Summit 2014: Successful Software Development with Apache Cassandra
Cassandra Summit 2014: Successful Software Development with Apache CassandraDataStax Academy
 
Project final report
Project final reportProject final report
Project final reportALIN BABU
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019PhuocNT (Fresher.VN)
 
Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Fwdays
 
1st slide VLSI.pdf
1st slide VLSI.pdf1st slide VLSI.pdf
1st slide VLSI.pdfmisbahmridul
 
Dissertation_of_Pieter_van_Zyl_2_March_2010
Dissertation_of_Pieter_van_Zyl_2_March_2010Dissertation_of_Pieter_van_Zyl_2_March_2010
Dissertation_of_Pieter_van_Zyl_2_March_2010Pieter Van Zyl
 
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...Eduardo Nuno
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportAnne Nicolas
 
Lightweight APIs in mRuby
Lightweight APIs in mRubyLightweight APIs in mRuby
Lightweight APIs in mRubyPivorak MeetUp
 

Semelhante a Why is my build times so long? (20)

Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with Sherlock
 
Thesis
ThesisThesis
Thesis
 
Srs
SrsSrs
Srs
 
Contents_KiCad 6 Like A Pro – Projects.pdf
Contents_KiCad 6 Like A Pro – Projects.pdfContents_KiCad 6 Like A Pro – Projects.pdf
Contents_KiCad 6 Like A Pro – Projects.pdf
 
Successful Software Development with Apache Cassandra
Successful Software Development with Apache CassandraSuccessful Software Development with Apache Cassandra
Successful Software Development with Apache Cassandra
 
Cassandra Summit 2014: Successful Software Development with Apache Cassandra
Cassandra Summit 2014: Successful Software Development with Apache CassandraCassandra Summit 2014: Successful Software Development with Apache Cassandra
Cassandra Summit 2014: Successful Software Development with Apache Cassandra
 
Project final report
Project final reportProject final report
Project final report
 
Systems se
Systems seSystems se
Systems se
 
thesis
thesisthesis
thesis
 
thesis
thesisthesis
thesis
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
 
Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)
 
thesis
thesisthesis
thesis
 
1st slide VLSI.pdf
1st slide VLSI.pdf1st slide VLSI.pdf
1st slide VLSI.pdf
 
Dissertation_of_Pieter_van_Zyl_2_March_2010
Dissertation_of_Pieter_van_Zyl_2_March_2010Dissertation_of_Pieter_van_Zyl_2_March_2010
Dissertation_of_Pieter_van_Zyl_2_March_2010
 
report
reportreport
report
 
diss
dissdiss
diss
 
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
2010 13.guide de_la_programmation_avec_qgis_1.5_extensions_et_applications_pr...
 
Kernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel report
 
Lightweight APIs in mRuby
Lightweight APIs in mRubyLightweight APIs in mRuby
Lightweight APIs in mRuby
 

Mais de Kevin Simper

Building a game with WebVR
Building a game with WebVRBuilding a game with WebVR
Building a game with WebVRKevin Simper
 
How to create a CV
How to create a CVHow to create a CV
How to create a CVKevin Simper
 
Building P2P in the browser for zero cost
Building P2P in the browser for zero costBuilding P2P in the browser for zero cost
Building P2P in the browser for zero costKevin Simper
 
How Kubernetes allows your Startup to scale
How Kubernetes allows your Startup to scaleHow Kubernetes allows your Startup to scale
How Kubernetes allows your Startup to scaleKevin Simper
 
Contributing Open-Source workshop
Contributing Open-Source workshopContributing Open-Source workshop
Contributing Open-Source workshopKevin Simper
 
WebVR is now accessible
WebVR is now accessibleWebVR is now accessible
WebVR is now accessibleKevin Simper
 
Kubernetes at Google Cloud Community Copenhagen
Kubernetes at Google Cloud Community CopenhagenKubernetes at Google Cloud Community Copenhagen
Kubernetes at Google Cloud Community CopenhagenKevin Simper
 
Making Docker and Kubernetes a success at your Company
Making Docker and Kubernetes a success at your CompanyMaking Docker and Kubernetes a success at your Company
Making Docker and Kubernetes a success at your CompanyKevin Simper
 
Docker Best Practices in development and Production
Docker Best Practices in development and Production Docker Best Practices in development and Production
Docker Best Practices in development and Production Kevin Simper
 
Hack4dk presentation
Hack4dk presentationHack4dk presentation
Hack4dk presentationKevin Simper
 

Mais de Kevin Simper (10)

Building a game with WebVR
Building a game with WebVRBuilding a game with WebVR
Building a game with WebVR
 
How to create a CV
How to create a CVHow to create a CV
How to create a CV
 
Building P2P in the browser for zero cost
Building P2P in the browser for zero costBuilding P2P in the browser for zero cost
Building P2P in the browser for zero cost
 
How Kubernetes allows your Startup to scale
How Kubernetes allows your Startup to scaleHow Kubernetes allows your Startup to scale
How Kubernetes allows your Startup to scale
 
Contributing Open-Source workshop
Contributing Open-Source workshopContributing Open-Source workshop
Contributing Open-Source workshop
 
WebVR is now accessible
WebVR is now accessibleWebVR is now accessible
WebVR is now accessible
 
Kubernetes at Google Cloud Community Copenhagen
Kubernetes at Google Cloud Community CopenhagenKubernetes at Google Cloud Community Copenhagen
Kubernetes at Google Cloud Community Copenhagen
 
Making Docker and Kubernetes a success at your Company
Making Docker and Kubernetes a success at your CompanyMaking Docker and Kubernetes a success at your Company
Making Docker and Kubernetes a success at your Company
 
Docker Best Practices in development and Production
Docker Best Practices in development and Production Docker Best Practices in development and Production
Docker Best Practices in development and Production
 
Hack4dk presentation
Hack4dk presentationHack4dk presentation
Hack4dk presentation
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Why is my build times so long?