SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Parallel builds in Eclipse Workspaces
Value, making-of and optimal usages
Mickael Istria - @mickaelistria CC0 – No rights reserved
Demo Tool
For the demo/talk we use
https://github.com/mickaelistria/eclipse-ide-parallel-builds-demo
which
– Defines the WaitBuilder
– Allows to generate build Gantt chart
– Allows to generate signature of build
output (compare output)
– Allows to control scheduling rule for JDT
and M2E builders
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: legacy (pre-Photon)
Builds can only be sequential
The basics: Paralleling
● Create 1 job per project build
● Throttle on limited amount of threads
using JobGroup API
● Preference used by good old
Workspace.build() API
● Default in Photon and 2018-09 is
disabled (nbThreads == 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 or chain of projects build doesn’t block other
projects for too long
– If you have handlers on project builds completion, they’re
called way earlier
● Applies to any workspace-build solutions, including non-
IDE offerings like JDT-LS
Relying on jobs→Usable progress View
Dependency Graph: no parallel
Dependency graph is computed, and turned
into a sequence (via topological sort)
p3,p1,p2,p5,p4,p6
Dependency graph: Parallel
Graph is used directly and jobs are scheduled
for builds as soon as all ancestors are built
About Scheduling Rules
● 2 operations using conflicting scheduling rules
rule1.isConflicting(rule2) can NOT run in parallel
● 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 and those scheduling rules prevent jobs for
running in parallel
– a/b and a/c are not conflicting and those schduling rules can allow jobs to run in
parallel
● Builders are expected to implement
IncrementalProjectBuilder.getRule(…)
Default is workspace.getRoot()
Here, p1 build rule conflicts with all other build rules → p1 won’t build in // of other projects
Scheduling rules don’t change
sequential scheduling
No jobs → 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
● M2E Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=538461
● PDE Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531555
…
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!
GOLDEN RULE:
To minimize conflicts and allow more parallelism,
set the narrowest rule your builder can deal with.
2018-09, a new hope...
JDT and m2e have a (hidden) preference to control
the builder’s scheduling rule and let it be null.
Hidden, but available for
testing with the test wizard,
or with typical preference
customization strategy (API,
plugin_customization.ini…)
in your Eclipse-based
package (like JDT-LS).
Try them!
Scheduling rules and parallel builds
All rules conflicting → No parallel builder execution
Current impl does not pass rules to schedule jobs
and use rules at job exec. Some jobs are started for
nothing ( ) and can block other builds.
But could do a bit 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
● Dependency cycles
● 1 project builder uses workspace root as
scheduling rule
Dependency chain vs standalone
project
1 thread
4 threads
p6 is available much much sooner
Some project output available
much sooner
With cycles, sequential
Compute a best sequential order (using “Strongly
connected component”) and apply it
p1,p2,p3,p4,p5,p6
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 uses 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) and MavenBuilder
(m2e)
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: Java (JDT & m2e)
JavaBuilder and MavenBuilder do use default
workspace root scheduling rule by default →
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: Java (JDT & m2e)
Applying the GOLDEN RULE on
JavaBuilder and
MavenBuilder shows that null
might be a good scheduling rule
https://bugs.eclipse.org/bugs/show_bug.cgi?id=531554#c22 . null
is the perfect value to avoid
conflict and enabled parallelism.
Effect of null scheduling rule for
JDT and m2e effect: story #1
Legacy
Scheduling
Rule
null
Scheduling
Rule
Build with 4
threads
Effect of null scheduling rule for
JDT and m2e effect: story #2
Legacy
Scheduling
Rule
null
Scheduling
Rule
Build with 4
threads
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?

Weitere ähnliche Inhalte

Was ist angesagt?

[오픈소스컨설팅]스카우터엑스 소개
[오픈소스컨설팅]스카우터엑스 소개[오픈소스컨설팅]스카우터엑스 소개
[오픈소스컨설팅]스카우터엑스 소개Open Source Consulting
 
서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해중선 곽
 
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint [D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint NAVER D2
 
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -onozaty
 
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -Takao Oyobe
 
FIFA 온라인 3의 MongoDB 사용기
FIFA 온라인 3의 MongoDB 사용기FIFA 온라인 3의 MongoDB 사용기
FIFA 온라인 3의 MongoDB 사용기Jongwon Kim
 
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐Terry Cho
 
traitを使って楽したい話
traitを使って楽したい話traitを使って楽したい話
traitを使って楽したい話infinite_loop
 
レガシーコード改善のススメ
レガシーコード改善のススメレガシーコード改善のススメ
レガシーコード改善のススメAkira Hirasawa
 
MySQL Fabricでぼっこぼこにされたはなし
MySQL FabricでぼっこぼこにされたはなしMySQL Fabricでぼっこぼこにされたはなし
MySQL Fabricでぼっこぼこにされたはなしyoku0825
 
GMOプライベートDMPの仕組み
GMOプライベートDMPの仕組みGMOプライベートDMPの仕組み
GMOプライベートDMPの仕組みMichio Katano
 
Lambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べるLambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べるshotaueda3
 
月間10億pvを支えるmongo db
月間10億pvを支えるmongo db月間10億pvを支えるmongo db
月間10億pvを支えるmongo dbYuji Isobe
 
Twitter의 snowflake 소개 및 활용
Twitter의 snowflake 소개 및 활용Twitter의 snowflake 소개 및 활용
Twitter의 snowflake 소개 및 활용흥배 최
 
Spring Fest 2018 Spring Bootで作るRESTful Web Service
Spring Fest 2018 Spring Bootで作るRESTful Web ServiceSpring Fest 2018 Spring Bootで作るRESTful Web Service
Spring Fest 2018 Spring Bootで作るRESTful Web ServiceWataruOhno
 
DDD x CQRS 更新系と参照系で異なるORMを併用して上手くいった話
DDD x CQRS   更新系と参照系で異なるORMを併用して上手くいった話DDD x CQRS   更新系と参照系で異なるORMを併用して上手くいった話
DDD x CQRS 更新系と参照系で異なるORMを併用して上手くいった話Koichiro Matsuoka
 
Samba4を「ふつうに」使おう!
Samba4を「ふつうに」使おう!Samba4を「ふつうに」使おう!
Samba4を「ふつうに」使おう!基信 高橋
 
MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後Takanori Sejima
 
これからSpringを使う開発者が知っておくべきこと
これからSpringを使う開発者が知っておくべきことこれからSpringを使う開発者が知っておくべきこと
これからSpringを使う開発者が知っておくべきこと土岐 孝平
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020Ji-Woong Choi
 

Was ist angesagt? (20)

[오픈소스컨설팅]스카우터엑스 소개
[오픈소스컨설팅]스카우터엑스 소개[오픈소스컨설팅]스카우터엑스 소개
[오픈소스컨설팅]스카우터엑스 소개
 
서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해서버 성능에 대한 정의와 이해
서버 성능에 대한 정의와 이해
 
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint [D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint
[D2] java 애플리케이션 트러블 슈팅 사례 & pinpoint
 
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -
今からでも遅くないDBマイグレーション - Flyway と SchemaSpy の紹介 -
 
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -
私がスクラムをやめた理由 - 全員スクラムマスター。@DevLove -
 
FIFA 온라인 3의 MongoDB 사용기
FIFA 온라인 3의 MongoDB 사용기FIFA 온라인 3의 MongoDB 사용기
FIFA 온라인 3의 MongoDB 사용기
 
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐
대용량 분산 아키텍쳐 설계 #3 대용량 분산 시스템 아키텍쳐
 
traitを使って楽したい話
traitを使って楽したい話traitを使って楽したい話
traitを使って楽したい話
 
レガシーコード改善のススメ
レガシーコード改善のススメレガシーコード改善のススメ
レガシーコード改善のススメ
 
MySQL Fabricでぼっこぼこにされたはなし
MySQL FabricでぼっこぼこにされたはなしMySQL Fabricでぼっこぼこにされたはなし
MySQL Fabricでぼっこぼこにされたはなし
 
GMOプライベートDMPの仕組み
GMOプライベートDMPの仕組みGMOプライベートDMPの仕組み
GMOプライベートDMPの仕組み
 
Lambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べるLambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べる
 
月間10億pvを支えるmongo db
月間10億pvを支えるmongo db月間10億pvを支えるmongo db
月間10億pvを支えるmongo db
 
Twitter의 snowflake 소개 및 활용
Twitter의 snowflake 소개 및 활용Twitter의 snowflake 소개 및 활용
Twitter의 snowflake 소개 및 활용
 
Spring Fest 2018 Spring Bootで作るRESTful Web Service
Spring Fest 2018 Spring Bootで作るRESTful Web ServiceSpring Fest 2018 Spring Bootで作るRESTful Web Service
Spring Fest 2018 Spring Bootで作るRESTful Web Service
 
DDD x CQRS 更新系と参照系で異なるORMを併用して上手くいった話
DDD x CQRS   更新系と参照系で異なるORMを併用して上手くいった話DDD x CQRS   更新系と参照系で異なるORMを併用して上手くいった話
DDD x CQRS 更新系と参照系で異なるORMを併用して上手くいった話
 
Samba4を「ふつうに」使おう!
Samba4を「ふつうに」使おう!Samba4を「ふつうに」使おう!
Samba4を「ふつうに」使おう!
 
MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後
 
これからSpringを使う開発者が知っておくべきこと
これからSpringを使う開発者が知っておくべきことこれからSpringを使う開発者が知っておくべきこと
これからSpringを使う開発者が知っておくべきこと
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
 

Ähnlich wie Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018

Parallel builds in Eclipse IDE workspace
Parallel builds in Eclipse IDE workspaceParallel builds in Eclipse IDE workspace
Parallel builds in Eclipse IDE workspaceMickael Istria
 
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)Questpond
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB
 
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupWhat's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupKaxil Naik
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara AnjargolianHakka Labs
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Decrease build time and application size
Decrease build time and application sizeDecrease build time and application size
Decrease build time and application sizeKeval Patel
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
 
Esctl in action elastic user group presentation aug 25 2020
Esctl in action   elastic user group presentation aug 25 2020Esctl in action   elastic user group presentation aug 25 2020
Esctl in action elastic user group presentation aug 25 2020FaithWestdorp
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
Michal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle BuildsMichal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle Buildsmdevtalk
 
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectWhy you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectJoaquín Muñoz M.
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldSimon Haslam
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 

Ähnlich wie Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018 (20)

Parallel builds in Eclipse IDE workspace
Parallel builds in Eclipse IDE workspaceParallel builds in Eclipse IDE workspace
Parallel builds in Eclipse IDE workspace
 
AOT(Ahead Of Time)
AOT(Ahead Of Time)AOT(Ahead Of Time)
AOT(Ahead Of Time)
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + Kubernetes
 
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupWhat's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Gradle
GradleGradle
Gradle
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Why Gradle?
Why Gradle?Why Gradle?
Why Gradle?
 
Decrease build time and application size
Decrease build time and application sizeDecrease build time and application size
Decrease build time and application size
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Esctl in action elastic user group presentation aug 25 2020
Esctl in action   elastic user group presentation aug 25 2020Esctl in action   elastic user group presentation aug 25 2020
Esctl in action elastic user group presentation aug 25 2020
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Michal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle BuildsMichal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle Builds
 
Why you should consider a microframework for your next web project
Why you should consider a microframework for your next web projectWhy you should consider a microframework for your next web project
Why you should consider a microframework for your next web project
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle World
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!
 

Mehr von Mickael Istria

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

Mehr von Mickael Istria (16)

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

Kürzlich hochgeladen

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Parallel builds in Eclipse IDE workspace - EclispeCon Europe 2018

  • 1. Parallel builds in Eclipse Workspaces Value, making-of and optimal usages Mickael Istria - @mickaelistria CC0 – No rights reserved
  • 2. Demo Tool For the demo/talk we use https://github.com/mickaelistria/eclipse-ide-parallel-builds-demo which – Defines the WaitBuilder – Allows to generate build Gantt chart – Allows to generate signature of build output (compare output) – Allows to control scheduling rule for JDT and M2E builders
  • 3. 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.
  • 4. The basics: legacy (pre-Photon) Builds can only be sequential
  • 5. The basics: Paralleling ● Create 1 job per project build ● Throttle on limited amount of threads using JobGroup API ● Preference used by good old Workspace.build() API ● Default in Photon and 2018-09 is disabled (nbThreads == 1)
  • 6. The basics: Parallelized No dependencies, isolated scheduling rules
  • 7. The basics: Benefits ● Shorter full time to completion (& less energy consumed) ● Faster availability of each project – A long project or chain of projects build doesn’t block other projects for too long – If you have handlers on project builds completion, they’re called way earlier ● Applies to any workspace-build solutions, including non- IDE offerings like JDT-LS
  • 8. Relying on jobs→Usable progress View
  • 9. Dependency Graph: no parallel Dependency graph is computed, and turned into a sequence (via topological sort) p3,p1,p2,p5,p4,p6
  • 10. Dependency graph: Parallel Graph is used directly and jobs are scheduled for builds as soon as all ancestors are built
  • 11. About Scheduling Rules ● 2 operations using conflicting scheduling rules rule1.isConflicting(rule2) can NOT run in parallel ● 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 and those scheduling rules prevent jobs for running in parallel – a/b and a/c are not conflicting and those schduling rules can allow jobs to run in parallel ● Builders are expected to implement IncrementalProjectBuilder.getRule(…) Default is workspace.getRoot() Here, p1 build rule conflicts with all other build rules → p1 won’t build in // of other projects
  • 12. Scheduling rules don’t change sequential scheduling No jobs → no issue about conflicting scheduling rules
  • 13. 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.
  • 14. (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
  • 15. (Bad) examples ● JDT Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531554 ● M2E Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=538461 ● PDE Builder https://bugs.eclipse.org/bugs/show_bug.cgi?id=531555 … Use default workspace scheduling rule, preventing parallel execution and blocking user actions in unrelated files!
  • 16. 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!
  • 17. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 18. 2018-09, a new hope... JDT and m2e have a (hidden) preference to control the builder’s scheduling rule and let it be null. Hidden, but available for testing with the test wizard, or with typical preference customization strategy (API, plugin_customization.ini…) in your Eclipse-based package (like JDT-LS). Try them!
  • 19. Scheduling rules and parallel builds All rules conflicting → No parallel builder execution
  • 20. Current impl does not pass rules to schedule jobs and use rules at job exec. Some jobs are started for nothing ( ) and can block other builds. But could do a bit better
  • 21. 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.
  • 22. Highlighted cases ● Long build chain vs standalone projet ● Dependency cycles ● 1 project builder uses workspace root as scheduling rule
  • 23. Dependency chain vs standalone project 1 thread 4 threads p6 is available much much sooner Some project output available much sooner
  • 24. With cycles, sequential Compute a best sequential order (using “Strongly connected component”) and apply it p1,p2,p3,p4,p5,p6
  • 25. 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
  • 26. Workspace root scheduling rule ● For backward compatibility, if any builder uses 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
  • 27. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 28. Case studies 1. dotnet build builder 2. JavaBuilder (JDT) and MavenBuilder (m2e)
  • 29. 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% ?
  • 30. 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!
  • 31. Case study #2: Java (JDT & m2e) JavaBuilder and MavenBuilder do use default workspace root scheduling rule by default → Disable/prevents parallel builds
  • 32. GOLDEN RULE: To minimize conflicts and allow more parallelism, set the narrowest rule your builder can deal with.
  • 33. Case study #2: Java (JDT & m2e) Applying the GOLDEN RULE on JavaBuilder and MavenBuilder shows that null might be a good scheduling rule https://bugs.eclipse.org/bugs/show_bug.cgi?id=531554#c22 . null is the perfect value to avoid conflict and enabled parallelism.
  • 34. Effect of null scheduling rule for JDT and m2e effect: story #1 Legacy Scheduling Rule null Scheduling Rule Build with 4 threads
  • 35. Effect of null scheduling rule for JDT and m2e effect: story #2 Legacy Scheduling Rule null Scheduling Rule Build with 4 threads
  • 36. 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?

Hinweis der Redaktion

  1. 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