SlideShare a Scribd company logo
1 of 23
Download to read offline
Scaling Xtext
Lieven Lemiengre
Sigasi
● IDE for Hardware Description Languages
○ VHDL, (System)Verilog
● Using Xtext for 4 years
● Large user base
○ (commercial, free, students)
Our company goal
● Assist hardware designer
● High quality interactive front-end compiler
○ Instant error reporting
■ parsing, semantic, linting, style checking
○ Visualisations, design exploration, ...
○ Integrate with ecosystem
■ other compilers, simulators, synthesizers
The challenge
● Large projects
○ > 250 KLOC is not uncommon
○ design + external libraries
○ big files
■ some libraries are distributed as 1 file
■ generated hardware cores
●
Adopting Xtext
● Started with the early Xtext 2.0 snapshots
● Initial performance analysis
○ Clean build performance of a big project (330k LOC)
■ > 20 minutes
■ > 2 GB
○ Editing big files (> 1 MB)
■ unusable
Adopting Xtext
● Started with the early Xtext 2.0 snapshots
● Initial performance analysis
○ Clean build performance of a big project (330k LOC)
■ > 20 minutes → < 1 min
■ > 2 GB → < 1 GB memory
○ Editing big files (> 1 MB)
■ unusable → usable with reduced editor
● Xtext framework improvements
● Measure → analyze → improve or cheat
○ faster build
○ reduce memory usage
○ UI responsiveness
Improving performance
Overview
● Analysing build performance
○ Analyze the build
■ Macro build measurements
■ Key performance points
○ Reduce workload
○ Parallelize the build
● Analyzing UI issues
○ Monitoring the UI thread
○ Saveguards
Analyzing builds: builder overview
Global
indexing
Linking
Validation
Custom
Validation
Global
index
Eclipse
resources
warnings
errors
resource
descriptions
Builder
Participants
resource
changes
?
Analyzing builds: metrics
● For each build
○ # of files being build
○ timing: Global index, Linking, Validation, Individual
builder participants
● Instrument by overriding
ClusteringBuilderState & XtextBuilder
● Example: Building 134 resources, timing: {
global index=1806,
linking=378,
validation=823,
totalLinkingAndValidation=1364
}
Analyzing builds: resource loads
● Observation:
○ Most time spent in resource loads
○ Certain files are loaded multiple times?!
Global
indexing
Linking Validation
Builder
Participants
resources
LOAD
POTENTIAL
RELOAD
POTENTIAL
RELOAD
Analyzing builds: Memory footprint
Global
index
Resource
Set
● Global index
○ always loaded →limit size
○ use hashing: name + hash of contents
● Reduce EMF size
derived model -> Xcore model
http://www.sigasi.com/content/view-complexity-your-xtext-ecore-model
Optimize loading
● What is resource load?
○ Parse
○ build EMF model
○ build Node model
● Parallelise
○ parse multiple files simultaneously
○ ~3 time faster loads on 4 core machine
○ EMF synchronization issues
● Cache
○ serialize EMF and Node model in a cache
○ 3-4 time faster loads
Linking
Global
indexing
Linking Validation
Builder
Participants
● Language specific
○ VHDL vs Verilog
● Avoiding linking
○ expressions that we couldn’t handle (yet)
○ library files, only when used in user-code
● Many iterations
○ lazy linking vs eager linking
○ From 40% of build time to 20%
Linking
Pseudo-algorithm
● In your IScopePovider
○ Find a eContainer that can be linked eagerly
○ Link everything
■ unresolved links become UnlinkedDeclaration
● In your DefaultLinkingService
○ getLinkedObjects(...)
■ already resolved? → skip it
● Disable notifications
Validation
Global
indexing
Linking Validation
Builder
Participants
● Combine validations to avoid model
traversals
● Local analysis, do global validations moved
into builder participant
● Avoid validation
○ disabled validations
○ libraries: errors & warnings are suppressed anyway
● Monitor
Track performance
● Nightly build
● log build times
UI responsiveness
● Measuring: detect a blocked UI thread
○ initially Svelto https://github.com/dragos/svelto
○ now our own method & logging
○ Eclipse Mars
● Improvements
○ UI is for drawing only!
○ Make sure everything is cancellable
● Safeguards
○ certain services should never be executed on the UI
thread => check & log
Lightweight Editor (fallback)
● Syntax-highlighting + markers
● For files > 1 MB
● Based on ContentTypes extension point
Two ContentTypes (based on file size)
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type ...
describer="com.sigasi...FullVhdlContentDescriber"
name="VHDL editor"
<describer class="...FullVhdlContentDescriber" />
</content-type>
<content-type ...
describer="com.sigasi....LightweightVhdlContentDescriber"
name="Lightweight VHDL editor"
<describer class="...LightweightVhdlContentDescriber" />
</content-type>
</extension>
Future work
● Continuous process
● Cache global index info per resource?
● Linking without node model?
● Avoid project locking build (Xtext 2.8?)
Come talk to us about...
● Documentation generation
● Fancy linking algorithms / type systems
● Graphical views
● Cross-language support
● Testing Xtext-plugins
● Lexical macros
● Manage large amount of validations
● ...
+1 0 -1
Sign in: www.eclipsecon.org
Evaluate the sessions

More Related Content

What's hot

Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
niallo
 

What's hot (19)

Microservices Architecture and Containers.
Microservices Architecture and Containers.Microservices Architecture and Containers.
Microservices Architecture and Containers.
 
Atmosphere packages and the chuck norris effect
Atmosphere packages and the chuck norris effectAtmosphere packages and the chuck norris effect
Atmosphere packages and the chuck norris effect
 
Web App Prototypes with Google App Engine
Web App Prototypes with Google App EngineWeb App Prototypes with Google App Engine
Web App Prototypes with Google App Engine
 
Perl Tools for Productivity
Perl Tools for ProductivityPerl Tools for Productivity
Perl Tools for Productivity
 
Azure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutesAzure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutes
 
Hello android
Hello androidHello android
Hello android
 
Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
Continuous Deployment of Front-end JavaScript with StriderCD, Github and Sauc...
 
Getting Started with Java
Getting Started with JavaGetting Started with Java
Getting Started with Java
 
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
 
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
 
Implementation of the new REST API for Open Source LBS-platform Geo2Tag
Implementation of the new REST API for Open Source LBS-platform Geo2TagImplementation of the new REST API for Open Source LBS-platform Geo2Tag
Implementation of the new REST API for Open Source LBS-platform Geo2Tag
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
Docker
DockerDocker
Docker
 
Linq To XML Overview
Linq To XML OverviewLinq To XML Overview
Linq To XML Overview
 
Web Assembly
Web AssemblyWeb Assembly
Web Assembly
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEAN
 
Eclipse demo camp 2016 Toronto
Eclipse demo camp 2016 TorontoEclipse demo camp 2016 Toronto
Eclipse demo camp 2016 Toronto
 
Synapse india reviews sharing chapter 23 – asp.net
Synapse india reviews sharing  chapter 23 – asp.netSynapse india reviews sharing  chapter 23 – asp.net
Synapse india reviews sharing chapter 23 – asp.net
 
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
 

Viewers also liked

Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi
 
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi
 
Allied Presentation PD Jan 2015
Allied Presentation  PD Jan 2015Allied Presentation  PD Jan 2015
Allied Presentation PD Jan 2015
Paul W Davies
 
Digital signal processing_by_j.s.chitode
Digital signal processing_by_j.s.chitodeDigital signal processing_by_j.s.chitode
Digital signal processing_by_j.s.chitode
Devi Devika
 
Effect of planting containers, cutting types and IBA on transplants productio...
Effect of planting containers, cutting types and IBA on transplants productio...Effect of planting containers, cutting types and IBA on transplants productio...
Effect of planting containers, cutting types and IBA on transplants productio...
Ahmedabd Eleslamboly Eleslamboly
 

Viewers also liked (20)

Vipra nov 15
Vipra nov 15Vipra nov 15
Vipra nov 15
 
Pengembalian keputusan dalam organisasi
Pengembalian keputusan dalam organisasiPengembalian keputusan dalam organisasi
Pengembalian keputusan dalam organisasi
 
Places to visit in andaman
Places to visit in andamanPlaces to visit in andaman
Places to visit in andaman
 
Research Paper
Research PaperResearch Paper
Research Paper
 
Ordin 1802 abrogare 3055
Ordin 1802 abrogare 3055Ordin 1802 abrogare 3055
Ordin 1802 abrogare 3055
 
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15
 
How To Celebrate Labor Day
How To Celebrate Labor DayHow To Celebrate Labor Day
How To Celebrate Labor Day
 
Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15Faiz Aldalbhi CV English dated 17 Nov 15
Faiz Aldalbhi CV English dated 17 Nov 15
 
Allied Presentation PD Jan 2015
Allied Presentation  PD Jan 2015Allied Presentation  PD Jan 2015
Allied Presentation PD Jan 2015
 
презентация звезды 2015
презентация звезды 2015презентация звезды 2015
презентация звезды 2015
 
Digital signal processing_by_j.s.chitode
Digital signal processing_by_j.s.chitodeDigital signal processing_by_j.s.chitode
Digital signal processing_by_j.s.chitode
 
створення візитки
створення візиткистворення візитки
створення візитки
 
Create Awareness Through HSE Posters
Create Awareness Through HSE PostersCreate Awareness Through HSE Posters
Create Awareness Through HSE Posters
 
Happy birthday colorful cake
Happy birthday colorful cakeHappy birthday colorful cake
Happy birthday colorful cake
 
SachinKumar_Imp
SachinKumar_ImpSachinKumar_Imp
SachinKumar_Imp
 
Effect of planting containers, cutting types and IBA on transplants productio...
Effect of planting containers, cutting types and IBA on transplants productio...Effect of planting containers, cutting types and IBA on transplants productio...
Effect of planting containers, cutting types and IBA on transplants productio...
 
Vipra jan 2016
Vipra jan 2016Vipra jan 2016
Vipra jan 2016
 
Session 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanterSession 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanter
 
Bhtkh july15
Bhtkh july15Bhtkh july15
Bhtkh july15
 
Session 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya DynamicsSession 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya Dynamics
 

Similar to Scaling xtext

Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ide
Sigasi
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
Matthias Luebken
 
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Giovanni Toraldo
 

Similar to Scaling xtext (20)

Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipster
 
Dart the better Javascript 2015
Dart the better Javascript 2015Dart the better Javascript 2015
Dart the better Javascript 2015
 
Future of Microservices - Jakub Hadvig
Future of Microservices - Jakub HadvigFuture of Microservices - Jakub Hadvig
Future of Microservices - Jakub Hadvig
 
Paris.py
Paris.pyParis.py
Paris.py
 
Code-Hub
Code-HubCode-Hub
Code-Hub
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ide
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
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
 
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyDesign Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
 
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
[scala.by] Launching new application fast
[scala.by] Launching new application fast[scala.by] Launching new application fast
[scala.by] Launching new application fast
 
Software maintenance PyConUK 2016
Software maintenance PyConUK 2016Software maintenance PyConUK 2016
Software maintenance PyConUK 2016
 
Front-End Developer's Career Roadmap
Front-End Developer's Career RoadmapFront-End Developer's Career Roadmap
Front-End Developer's Career Roadmap
 
Embedded Linux - Building toolchain
Embedded Linux - Building toolchainEmbedded Linux - Building toolchain
Embedded Linux - Building toolchain
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Scaling xtext

  • 2. Sigasi ● IDE for Hardware Description Languages ○ VHDL, (System)Verilog ● Using Xtext for 4 years ● Large user base ○ (commercial, free, students)
  • 3. Our company goal ● Assist hardware designer ● High quality interactive front-end compiler ○ Instant error reporting ■ parsing, semantic, linting, style checking ○ Visualisations, design exploration, ... ○ Integrate with ecosystem ■ other compilers, simulators, synthesizers
  • 4. The challenge ● Large projects ○ > 250 KLOC is not uncommon ○ design + external libraries ○ big files ■ some libraries are distributed as 1 file ■ generated hardware cores ●
  • 5. Adopting Xtext ● Started with the early Xtext 2.0 snapshots ● Initial performance analysis ○ Clean build performance of a big project (330k LOC) ■ > 20 minutes ■ > 2 GB ○ Editing big files (> 1 MB) ■ unusable
  • 6. Adopting Xtext ● Started with the early Xtext 2.0 snapshots ● Initial performance analysis ○ Clean build performance of a big project (330k LOC) ■ > 20 minutes → < 1 min ■ > 2 GB → < 1 GB memory ○ Editing big files (> 1 MB) ■ unusable → usable with reduced editor
  • 7. ● Xtext framework improvements ● Measure → analyze → improve or cheat ○ faster build ○ reduce memory usage ○ UI responsiveness Improving performance
  • 8. Overview ● Analysing build performance ○ Analyze the build ■ Macro build measurements ■ Key performance points ○ Reduce workload ○ Parallelize the build ● Analyzing UI issues ○ Monitoring the UI thread ○ Saveguards
  • 9. Analyzing builds: builder overview Global indexing Linking Validation Custom Validation Global index Eclipse resources warnings errors resource descriptions Builder Participants resource changes ?
  • 10. Analyzing builds: metrics ● For each build ○ # of files being build ○ timing: Global index, Linking, Validation, Individual builder participants ● Instrument by overriding ClusteringBuilderState & XtextBuilder ● Example: Building 134 resources, timing: { global index=1806, linking=378, validation=823, totalLinkingAndValidation=1364 }
  • 11. Analyzing builds: resource loads ● Observation: ○ Most time spent in resource loads ○ Certain files are loaded multiple times?! Global indexing Linking Validation Builder Participants resources LOAD POTENTIAL RELOAD POTENTIAL RELOAD
  • 12. Analyzing builds: Memory footprint Global index Resource Set ● Global index ○ always loaded →limit size ○ use hashing: name + hash of contents ● Reduce EMF size derived model -> Xcore model http://www.sigasi.com/content/view-complexity-your-xtext-ecore-model
  • 13. Optimize loading ● What is resource load? ○ Parse ○ build EMF model ○ build Node model ● Parallelise ○ parse multiple files simultaneously ○ ~3 time faster loads on 4 core machine ○ EMF synchronization issues ● Cache ○ serialize EMF and Node model in a cache ○ 3-4 time faster loads
  • 14. Linking Global indexing Linking Validation Builder Participants ● Language specific ○ VHDL vs Verilog ● Avoiding linking ○ expressions that we couldn’t handle (yet) ○ library files, only when used in user-code ● Many iterations ○ lazy linking vs eager linking ○ From 40% of build time to 20%
  • 15. Linking Pseudo-algorithm ● In your IScopePovider ○ Find a eContainer that can be linked eagerly ○ Link everything ■ unresolved links become UnlinkedDeclaration ● In your DefaultLinkingService ○ getLinkedObjects(...) ■ already resolved? → skip it ● Disable notifications
  • 16. Validation Global indexing Linking Validation Builder Participants ● Combine validations to avoid model traversals ● Local analysis, do global validations moved into builder participant ● Avoid validation ○ disabled validations ○ libraries: errors & warnings are suppressed anyway ● Monitor
  • 17. Track performance ● Nightly build ● log build times
  • 18. UI responsiveness ● Measuring: detect a blocked UI thread ○ initially Svelto https://github.com/dragos/svelto ○ now our own method & logging ○ Eclipse Mars ● Improvements ○ UI is for drawing only! ○ Make sure everything is cancellable ● Safeguards ○ certain services should never be executed on the UI thread => check & log
  • 19. Lightweight Editor (fallback) ● Syntax-highlighting + markers ● For files > 1 MB ● Based on ContentTypes extension point
  • 20. Two ContentTypes (based on file size) <extension point="org.eclipse.core.contenttype.contentTypes"> <content-type ... describer="com.sigasi...FullVhdlContentDescriber" name="VHDL editor" <describer class="...FullVhdlContentDescriber" /> </content-type> <content-type ... describer="com.sigasi....LightweightVhdlContentDescriber" name="Lightweight VHDL editor" <describer class="...LightweightVhdlContentDescriber" /> </content-type> </extension>
  • 21. Future work ● Continuous process ● Cache global index info per resource? ● Linking without node model? ● Avoid project locking build (Xtext 2.8?)
  • 22. Come talk to us about... ● Documentation generation ● Fancy linking algorithms / type systems ● Graphical views ● Cross-language support ● Testing Xtext-plugins ● Lexical macros ● Manage large amount of validations ● ...
  • 23. +1 0 -1 Sign in: www.eclipsecon.org Evaluate the sessions