SlideShare a Scribd company logo
Parallel builds in Eclipse IDE Workspace
Value, making-of and optimal usages
Mickael Istria - @mickaelistria CC0 – No rights reserved
Advertisement: OpenShift.io
Parallel builds in Eclipse IDE Workspace
Value, making-of and optimal usages
Mickael Istria - @mickaelistria CC0 – No rights reserved
Demo scenario
6 projects with WaitBuilder waiting for some time (Thread.sleep())
– Projects deps directly configured in .project
– Builder duration configured in waitBuilder.properties (default 1000ms)
– Builder schedulingRule configured in waitBuilder.properties (default current
project) can be set to workspace root or some other project.
The basics: currently (pre-Photon)
Builds are sequential; most basic case: no dep,
not conflicting scheduling rule
The basics: Parallelizing
● Create 1 job per build
● Throttle on limited amount of
threads using JobGroup API
● Preference used by ”legacy”
Workspace.build() API
● Default in Photon is
disabled (value == 1)
The basics: Parallelized
No dependencies, isolated scheduling rules
The basics: Benefits
● Shorter full time to completion (& less energy
consumed)
● Faster availability of each project
– A long project build doesn’t block for too long
– If you have handlers on project builds completion,
they’re called way earlier
Usable progress View
Dependency Graph: no parallel
Dependency graph is computed, and turned
into a sequence (via topological sort)
Dependency graph: Parallel (4 threads)
Graph is used directly and jobs are scheduled
for builds when all ancestors are built
Scheduling Rules
● 2 operations using conflicting scheduling rules
rule1.isConflicting(rule2) can NOT run at the same time,
even in different threads.
●
Scheduling rules are usually Resource Path which conflict when
one path is a parent of the other ( a/b and a/b/c are
conflicting;
a/b and a/c are not conflicting)
●
Builders are expected to implement
IncrementalProjectBuilder.getRule(…)
Default is workspace.getRoot()
Here, p1 build rule conflicts with all other build rules
Scheduling rules don’t matter for
scheduling in non-parallel
As it’s sequential, no issue about conflicting
scheduling rules
So why scheduling rules on builders?
Safety: Scheduling rule are here to prevent some other
thread to change critical content while builder is
running. The scheduling rule defines what must NOT
be changed externally while builder is running.
GOLDEN RULE: To minimize conflicts and allow
more parallelism, set the narrowest rule your
builder can deal with.
(Bad) State of art
Many builders do not specify a scheduling rule
(defaulting to workspace root, conflicting with
every workspace operation)
→ Building a project locks the whole workspace!
Builder uses root as SR, conflicts with whole WS
Change file in another
unrelated Project + Save
(Bad) examples
● JDT Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531554
● PDE Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531555
● M2E Builder
…
Use default workspace scheduling rule,
preventing parallel execution and blocking user
actions in unrelated files!
With finer scheduling rule...
More specific scheduling rule, only necessary
content is locked by builder.
For example, just using getProject() as
scheduling rule can often be enough.
Builder uses project as SR, conflicts with only project content
Change file in another
unrelated Project + Save File just saved!
Back to parallel builds
Not conflicting builder execution, no bad results
Current impl does not pass rules to schedule jobs
and use rules at job exec. Some jobs are started for
nothing ( )
But could do better
Now you got it
● 1 project build → 1 job
● Throttling with JobGroup
● Scheduled according to dependency graph
● Honoring scheduling rules
GOLDEN RULE: To minimize conflicts and allow
more parallelism, set the narrowest rule your
builder can deal with.
Highlighted cases
● Long build chain vs standalone projet
● Depedency cycles
● 1 project builder uses workspace root as
scheduling rule
Long chain vs standalone project
1 thread
4 threads
p6 is available much much earlier
With cycles, sequential
Compute a best sequential order (using “Strongly
connected component”) and apply it
With cycles, parallel
1. Process graph until no node is ready (symptom of cycle)
2. Then process the 1st
waiting node in computed sequential order
3. Then back to regular graph processing.
1 2 3
Workspace root scheduling rule
● For backward compatibility, if any builder use workspace
root scheduling rule, disable parallel builds (as the
scheduler will use this rule in its thread)
● Anyway, workspace root would conflict with about
everything…
● So most builders currently prevents parallel builds
GOLDEN RULE:
To minimize conflicts and allow more parallelism,
set the narrowest rule your builder can deal with.
Case studies
1. dotnet build builder
2. JavaBuilder (JDT)
Case Study #1
6 independent C# projects building with dotnet
build (builder scheduling root == current project)
Sequential build takes 39s
Parallel on 4 threads takes 26s
Actual gain: 33% (cool, but...)
Expected gain: 66%
?
Case study #1 lesson learned
Most real world operation have bottlenecks (I/O,
network…) making concurrent executions slower.
Sequential
4 threads
But still a major win!
Case study #2: JDT
JavaBuilder do use default workspace root
scheduling rule → Disable/prevents parallel builds
GOLDEN RULE:
To minimize conflicts and allow more parallelism,
set the narrowest rule your builder can deal with.
Case study #2: JavaBuilder’s scheduling rule
Allows independent non-JDT builds in parallel of JDT ones for
more immediate availability.
Hopefully part of Eclipse JDT 4.9 (September 2018)
Possible greedy
& safe
scheduling rule:
all JDT projects
Finding the minimal scheduling rule (ie apply the GOLDEN
RULE) would require a thourough analysis of JavaBuilder.
– What can be done in parallel?
– What needs to be synchronized and how?
– ...
Probably very worth the effort as it’d speed up build in IDE and
JDT.LS, but maybe not if there are major bottlenecks...
Case study #2: JavaBuilder’s scheduling rule
Many builders similar to JDT
All the same issues and possible improvements
applies to other parts of the IDE (PDE, m2e,
WTP, PDT...)
Mickael Istria - @mickaelistria CC0 – No rights reserved
And remember GOLDEN RULE:
To minimize conflicts and allow more parallelism,
set the narrowest rule your builder can deal with.
Questions?

More Related Content

ODP
Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018
ODP
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
PPTX
The new React
ODP
Eclipse Mars News @JUG HH
PDF
Gradle build automation tool
ODP
Eclipse Buildship JUG Hamburg
PDF
ReactJS vs AngularJS - Head to Head comparison
PDF
Continuous Deployment of Architectural Change
Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
The new React
Eclipse Mars News @JUG HH
Gradle build automation tool
Eclipse Buildship JUG Hamburg
ReactJS vs AngularJS - Head to Head comparison
Continuous Deployment of Architectural Change

What's hot (20)

PPTX
Top 10 reasons to migrate to Gradle
ODP
Docker - An Introduction
ODP
Into the domain
PDF
Gradle by Example
PDF
Cassovary
PPTX
Java Development EcoSystem
PPTX
Test driving QML
PDF
Angry Developer: Creating a Game in QML and JavaScript for MeeGo N9 @iRajLal
PDF
Meetup React Sanca - 29/11/18 - React Testing
PPTX
Gradle 2.Write once, builde everywhere
PDF
Hidden Dragons of CGO
TXT
Gradle notes
PPTX
Say Hello to React day2 presentation
PDF
React vs angular
PPTX
JOIN 2021 Testable and reusable build automation Using Tekton
PDF
React vs angular (mobile first battle)
PDF
Angular 2 vs React. What to chose in 2017?
PPTX
Gradle 2.Breaking stereotypes
PPTX
Git.From thorns to the stars
PDF
ReactJS or Angular
Top 10 reasons to migrate to Gradle
Docker - An Introduction
Into the domain
Gradle by Example
Cassovary
Java Development EcoSystem
Test driving QML
Angry Developer: Creating a Game in QML and JavaScript for MeeGo N9 @iRajLal
Meetup React Sanca - 29/11/18 - React Testing
Gradle 2.Write once, builde everywhere
Hidden Dragons of CGO
Gradle notes
Say Hello to React day2 presentation
React vs angular
JOIN 2021 Testable and reusable build automation Using Tekton
React vs angular (mobile first battle)
Angular 2 vs React. What to chose in 2017?
Gradle 2.Breaking stereotypes
Git.From thorns to the stars
ReactJS or Angular
Ad

Similar to Parallel builds in Eclipse IDE workspace (20)

PDF
Performant Django - Ara Anjargolian
PDF
TDD done right - tests immutable to refactor
PDF
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
PPTX
Road to sbt 1.0: Paved with server (2015 Amsterdam)
PPTX
AOT(Ahead Of Time)
PPTX
Concurrency - Why it's hard ?
PPTX
Why Concurrency is hard ?
PPTX
Road to sbt 1.0 paved with server
PDF
Workers and Worker Patterns at Scale
PPTX
Mono Repo
PDF
node.js 실무 - node js in practice by Jesang Yoon
PDF
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
PPT
SynapseIndia drupal presentation on drupal info
PPTX
Instant developer onboarding with self contained repositories
PPSX
Case Study: How did we reduce the build time to one fifth?
PDF
Scaling with mongo db (with notes)
PPTX
PPTX
MoldCamp - multidimentional testing workflow. CIBox.
PDF
Tips For Maintaining OSS Projects
PDF
Gradle - From minutes to seconds: minimizing build times
Performant Django - Ara Anjargolian
TDD done right - tests immutable to refactor
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
Road to sbt 1.0: Paved with server (2015 Amsterdam)
AOT(Ahead Of Time)
Concurrency - Why it's hard ?
Why Concurrency is hard ?
Road to sbt 1.0 paved with server
Workers and Worker Patterns at Scale
Mono Repo
node.js 실무 - node js in practice by Jesang Yoon
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
SynapseIndia drupal presentation on drupal info
Instant developer onboarding with self contained repositories
Case Study: How did we reduce the build time to one fifth?
Scaling with mongo db (with notes)
MoldCamp - multidimentional testing workflow. CIBox.
Tips For Maintaining OSS Projects
Gradle - From minutes to seconds: minimizing build times
Ad

More from Mickael Istria (15)

ODP
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
ODP
[EclipseCon France 2017] Language Server Protocol in action
ODP
[EclipseCon France 2017] Eclipse Platform Generic Editor
PDF
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
ODP
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
ODP
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
ODP
Contribute to Eclipse projects
PDF
A journey with Target Platforms
ODP
Cool stuff in E4 for developers
PDF
Fight your technical debt with Jenkins, Jacoco and Sonar
ODP
What's up GMF Tooling?
ODP
Iterative and-agile-codegen
ODP
Modeling With Eclipse @SoftShake 2011
ODP
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
ODP
Sur la route de l'agilité @Mix-it Lyon 2011
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Eclipse Platform Generic Editor
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
Contribute to Eclipse projects
A journey with Target Platforms
Cool stuff in E4 for developers
Fight your technical debt with Jenkins, Jacoco and Sonar
What's up GMF Tooling?
Iterative and-agile-codegen
Modeling With Eclipse @SoftShake 2011
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
Sur la route de l'agilité @Mix-it Lyon 2011

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
A Presentation on Artificial Intelligence
PDF
Electronic commerce courselecture one. Pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectral efficient network and resource selection model in 5G networks
A Presentation on Artificial Intelligence
Electronic commerce courselecture one. Pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Parallel builds in Eclipse IDE workspace

  • 1. Parallel builds in Eclipse IDE Workspace Value, making-of and optimal usages Mickael Istria - @mickaelistria CC0 – No rights reserved
  • 3. Parallel builds in Eclipse IDE Workspace Value, making-of and optimal usages Mickael Istria - @mickaelistria CC0 – No rights reserved
  • 4. Demo scenario 6 projects with WaitBuilder waiting for some time (Thread.sleep()) – Projects deps directly configured in .project – Builder duration configured in waitBuilder.properties (default 1000ms) – Builder schedulingRule configured in waitBuilder.properties (default current project) can be set to workspace root or some other project.
  • 5. The basics: currently (pre-Photon) Builds are sequential; most basic case: no dep, not conflicting scheduling rule
  • 6. The basics: Parallelizing ● Create 1 job per build ● Throttle on limited amount of threads using JobGroup API ● Preference used by ”legacy” Workspace.build() API ● Default in Photon is disabled (value == 1)
  • 7. The basics: Parallelized No dependencies, isolated scheduling rules
  • 8. The basics: Benefits ● Shorter full time to completion (& less energy consumed) ● Faster availability of each project – A long project build doesn’t block for too long – If you have handlers on project builds completion, they’re called way earlier
  • 10. Dependency Graph: no parallel Dependency graph is computed, and turned into a sequence (via topological sort)
  • 11. Dependency graph: Parallel (4 threads) Graph is used directly and jobs are scheduled for builds when all ancestors are built
  • 12. Scheduling Rules ● 2 operations using conflicting scheduling rules rule1.isConflicting(rule2) can NOT run at the same time, even in different threads. ● Scheduling rules are usually Resource Path which conflict when one path is a parent of the other ( a/b and a/b/c are conflicting; a/b and a/c are not conflicting) ● Builders are expected to implement IncrementalProjectBuilder.getRule(…) Default is workspace.getRoot() Here, p1 build rule conflicts with all other build rules
  • 13. Scheduling rules don’t matter for scheduling in non-parallel As it’s sequential, no issue about conflicting scheduling rules
  • 14. So why scheduling rules on builders? Safety: Scheduling rule are here to prevent some other thread to change critical content while builder is running. The scheduling rule defines what must NOT be changed externally while builder is running. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 15. (Bad) State of art Many builders do not specify a scheduling rule (defaulting to workspace root, conflicting with every workspace operation) → Building a project locks the whole workspace! Builder uses root as SR, conflicts with whole WS Change file in another unrelated Project + Save
  • 16. (Bad) examples ● JDT Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531554 ● PDE Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531555 ● M2E Builder … Use default workspace scheduling rule, preventing parallel execution and blocking user actions in unrelated files!
  • 17. With finer scheduling rule... More specific scheduling rule, only necessary content is locked by builder. For example, just using getProject() as scheduling rule can often be enough. Builder uses project as SR, conflicts with only project content Change file in another unrelated Project + Save File just saved!
  • 18. Back to parallel builds Not conflicting builder execution, no bad results
  • 19. Current impl does not pass rules to schedule jobs and use rules at job exec. Some jobs are started for nothing ( ) But could do better
  • 20. Now you got it ● 1 project build → 1 job ● Throttling with JobGroup ● Scheduled according to dependency graph ● Honoring scheduling rules GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 21. Highlighted cases ● Long build chain vs standalone projet ● Depedency cycles ● 1 project builder uses workspace root as scheduling rule
  • 22. Long chain vs standalone project 1 thread 4 threads p6 is available much much earlier
  • 23. With cycles, sequential Compute a best sequential order (using “Strongly connected component”) and apply it
  • 24. With cycles, parallel 1. Process graph until no node is ready (symptom of cycle) 2. Then process the 1st waiting node in computed sequential order 3. Then back to regular graph processing. 1 2 3
  • 25. Workspace root scheduling rule ● For backward compatibility, if any builder use workspace root scheduling rule, disable parallel builds (as the scheduler will use this rule in its thread) ● Anyway, workspace root would conflict with about everything… ● So most builders currently prevents parallel builds
  • 26. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 27. Case studies 1. dotnet build builder 2. JavaBuilder (JDT)
  • 28. Case Study #1 6 independent C# projects building with dotnet build (builder scheduling root == current project) Sequential build takes 39s Parallel on 4 threads takes 26s Actual gain: 33% (cool, but...) Expected gain: 66% ?
  • 29. Case study #1 lesson learned Most real world operation have bottlenecks (I/O, network…) making concurrent executions slower. Sequential 4 threads But still a major win!
  • 30. Case study #2: JDT JavaBuilder do use default workspace root scheduling rule → Disable/prevents parallel builds
  • 31. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 32. Case study #2: JavaBuilder’s scheduling rule Allows independent non-JDT builds in parallel of JDT ones for more immediate availability. Hopefully part of Eclipse JDT 4.9 (September 2018) Possible greedy & safe scheduling rule: all JDT projects
  • 33. Finding the minimal scheduling rule (ie apply the GOLDEN RULE) would require a thourough analysis of JavaBuilder. – What can be done in parallel? – What needs to be synchronized and how? – ... Probably very worth the effort as it’d speed up build in IDE and JDT.LS, but maybe not if there are major bottlenecks... Case study #2: JavaBuilder’s scheduling rule
  • 34. Many builders similar to JDT All the same issues and possible improvements applies to other parts of the IDE (PDE, m2e, WTP, PDT...)
  • 35. Mickael Istria - @mickaelistria CC0 – No rights reserved And remember GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with. Questions?

Editor's Notes

  • #2: Pre-reqs: Eclipse IDE workspace with org.eclipsecon.editor in it open Build Jobs == 1 Project Explorer + (empty) editor area + progress view JDT tweaked to enable graphical report
  • #3: Go to our booth