SlideShare una empresa de Scribd logo
1 de 63
Descargar para leer sin conexión
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

Más contenido relacionado

Similar 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
 

Similar 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
 

Más 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
 

Más 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Why is my build times so long?