SlideShare a Scribd company logo
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

PDF
CON6423: Scalable JavaScript applications with Project Nashorn
PDF
Is the order code deploy?
PDF
React starter-kitでとっとと始めるisomorphic開発
PDF
Netflix Titus WASP October 2017
PDF
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
ODP
Oslo Vancouver Onboarding
PDF
Source code analyzer
PDF
Tech meetup: Web Applications Performance
CON6423: Scalable JavaScript applications with Project Nashorn
Is the order code deploy?
React starter-kitでとっとと始めるisomorphic開発
Netflix Titus WASP October 2017
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
Oslo Vancouver Onboarding
Source code analyzer
Tech meetup: Web Applications Performance

What's hot (19)

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

Viewers also liked (20)

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

Similar to Scaling xtext (20)

PDF
Devoxx : being productive with JHipster
PDF
Dart the better Javascript 2015
PDF
Future of Microservices - Jakub Hadvig
PDF
PDF
Code-Hub
PPTX
Node.js Web Apps @ ebay scale
PDF
Plc2 2015 your own ide
PDF
Who needs containers in a serverless world
PDF
Electron JS | Build cross-platform desktop applications with web technologies
PPTX
Instant developer onboarding with self contained repositories
PDF
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
PDF
Scheduling a fuller house - Talk at QCon NY 2016
PDF
Netflix Container Scheduling and Execution - QCon New York 2016
PDF
Continuous Delivery: 5 years later (Incontro DevOps 2018)
PDF
Architektura html, css i javascript - Jan Kraus
PDF
GeoServer Developers Workshop
PDF
[scala.by] Launching new application fast
PDF
Software maintenance PyConUK 2016
PDF
Front-End Developer's Career Roadmap
PDF
Embedded Linux - Building toolchain
Devoxx : being productive with JHipster
Dart the better Javascript 2015
Future of Microservices - Jakub Hadvig
Code-Hub
Node.js Web Apps @ ebay scale
Plc2 2015 your own ide
Who needs containers in a serverless world
Electron JS | Build cross-platform desktop applications with web technologies
Instant developer onboarding with self contained repositories
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Scheduling a fuller house - Talk at QCon NY 2016
Netflix Container Scheduling and Execution - QCon New York 2016
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Architektura html, css i javascript - Jan Kraus
GeoServer Developers Workshop
[scala.by] Launching new application fast
Software maintenance PyConUK 2016
Front-End Developer's Career Roadmap
Embedded Linux - Building toolchain

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PDF
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
A comparative analysis of optical character recognition models for extracting...
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
cuic standard and advanced reporting.pdf

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