SlideShare une entreprise Scribd logo
1  sur  130
Télécharger pour lire hors ligne
Xtext beyond the defaults
How to tackle performance problems
Who is that guy?
Xtext defaults are a good start!
But one size does not fit all!
Xtext defaults are a good start!
But one size does not fit all!
Amount of DSLs increases
Xtext defaults are a good start!
But one size does not fit all!
Amount of DSLs increases
Files get bigger
Xtext defaults are a good start!
But one size does not fit all!
Amount of DSLs increases
Files get bigger
Amount of files increases
Xtext defaults are a good start!
But one size does not fit all!
Amount of DSLs increases
Files get bigger
Amount of files increases
Many cross references
Xtext defaults are a good start!
But one size does not fit all!
Amount of DSLs increases
Files get bigger
Amount of files increases
Many cross references
Maybe transitive cross references…
Look what we have build!
Look what we have build!
More than 20 DSLs…
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
and we can check in broken models…
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
and we can check in broken models…
and we generate the missing stuff…
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
and we can check in broken models…
and we generate the missing stuff…
to make them valid again!
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
We are on Xtext 2.6.2 and can’t update!
and we can check in broken models…
and we generate the missing stuff…
to make them valid again!
Look what we have build!
More than 20 DSLs…
and 200.000 lines in one file…
We are on Xtext 2.6.2 and can’t update!
and we can check in broken models…
and we generate the missing stuff…
to make them valid again!
Could you please back-port the changes?
Everything is sooo slow!!!
Xtext sucks!!!
Finally think about improving the situation!
Update to newest Xtext Version
2.10.x
Update to newest Xtext Version
2.10.x
Xtext 2.11
released
early
2017
Why should I update???
Because…we killed bugs…
Because…we killed bugs…
Let workarounds
not last forever!
…Speed…
…Speed…
Resolving
cross-
references
has
never
been
faster…
…new features…
…new features…
Make
Xtext work
with
other
platform
s
…let’s work together.
…let’s work together.
It was
never
easier
to
contribute!
We
are
on
G
ithub
:-D
What about Performance…
Most problems happen in…
…Index and scoping…
…Memory consumption.
Validations…
… Complex generators…
I need Xbase in every language…
I need Xbase in every language…
… because my language is
complicated…
I need Xbase in every language…
… because my language is
complicated…
… no I can’t explain why…
I need Xbase in every language…
… because my language is
complicated…
… no I can’t explain why…
… but there is this small corner case…
Is a FAST validation really fast…
Is a FAST validation really fast…
… it’s triggered every time I stop typing
Scoping is sooo complicated…
Scoping is sooo complicated…
… I heard that in nearly every project…
Scoping is sooo complicated…
… I heard that in nearly every project…
…and people stop improving things when
it work’s for the first time…
Scoping is sooo complicated…
… I heard that in nearly every project…
…and people stop improving things when
it work’s for the first time…
… code is not touched any more because
who knows…
Scoping is sooo complicated…
… I heard that in nearly every project…
…and people stop improving things when
it work’s for the first time…
… code is not touched any more because
who knows…
… it worked before you touched it!
What’s the problem?
LocalScope
GlobalScope
ImportScopeTypeScope
Caches everywhere
The Index
Lazylinking
EcoreUtils.resolveAll should do the trick!
DerivedState
ContainerState
BatchLinkableResource
Scoping API
scope_Element_feature(Element element ,EReference ref)
Scoping API
scope_Element_feature(Element element ,EReference ref)
Scoping API
scope_Element_feature(Element element ,EReference ref)
Scoping API
scope_Element_feature(Element element ,EReference ref)
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
…in a reflective way…
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
and if grammar changed it might not get called any more…
…in a reflective way…
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
and if grammar changed it might not get called any more…
…in a reflective way…
…BECAUSE IT’S SLOW!
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
and if grammar changed it might not get called any more…
…in a reflective way…
…BECAUSE IT’S SLOW!
Implement
getScope(EObject context, EReference ref)
if(context instanceof Element && ref ==
MyPackage.Literals.ELEMENT_FEATURE)
up to 10 %
Scoping API
scope_Element_feature(Element element ,EReference ref)
Called by the PolymorphicDispatcher…
and if grammar changed it might not get called any more…
…in a reflective way…
…BECAUSE IT’S SLOW!
Implement
getScope(EObject context, EReference ref)
if(context instanceof Element && ref ==
MyPackage.Literals.ELEMENT_FEATURE)
up to 10 %Will not work
with
Xbase
anyway…
Use caches in the ScopeProvider
Use caches in the ScopeProvider
For each cross reference the ScopeProvider gets asked…
Use caches in the ScopeProvider
…and it calculates the very same stuff
over and over again…
For each cross reference the ScopeProvider gets asked…
Use caches in the ScopeProvider
…and it calculates the very same stuff
over and over again…
For each cross reference the ScopeProvider gets asked…
…cache the calculated stuff and invalidate it when
necessary!
Use caches in the ScopeProvider
…and it calculates the very same stuff
over and over again…
For each cross reference the ScopeProvider gets asked…
…cache the calculated stuff and invalidate it when
necessary!
The cache of the GlobalScope should be the index and
nothing else!
Use the force of the Index
Use the force of the Index
Holds all lightweight representations of
referenceable elements and their resources
Use the force of the Index
Holds all lightweight representations of
referenceable elements and their resources
It’s a HashMap…
It’s super fast since Xtext 2.x
and improved further
Holds all lightweight representations of
referenceable elements and their resources
Use the force of the Index
It’s a HashMap…
It’s super fast since Xtext 2.x
and improved further
It’s YOUR Index - you can put data in…!
Index - how to feed it
Index - how to feed it
1. Builder picks up DSL files and loads them one by one
Index - how to feed it
1. Builder picks up DSL files and loads them one by one
2. Creates ResourceDescriptions through ResourceDescriptionManager
Index - how to feed it
1. Builder picks up DSL files and loads them one by one
2. Creates ResourceDescriptions through ResourceDescriptionManager
3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to
create EObjectDescriptions
Index - how to feed it
1. Builder picks up DSL files and loads them one by one
2. Creates ResourceDescriptions through ResourceDescriptionManager
3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to
create EObjectDescriptions
You have to bind a custom impl for the ResourceDescriptionsStrategy in
the RuntimeModule
Index - how to feed it
1. Builder picks up DSL files and loads them one by one
2. Creates ResourceDescriptions through ResourceDescriptionManager
3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to
create EObjectDescriptions
You have to bind a custom impl for the ResourceDescriptionsStrategy in
the RuntimeModule
The default creates a EObjectDescription for
EVERY Element that has a name…
IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData)
Information hiding and userData
IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData)
Information hiding and userData
IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData)
Information hiding and userData
IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData)
Information hiding and userData
Save memory & time
UserData - what for?
UserData - what for?
Validation
Don’t load the world to get informations - put
them in the index
UserData - what for?
Validation
Don’t load the world to get informations - put
them in the index
Scoping
Don’t resolve proxies for simple informations
Reference non Xtext models
Reference non Xtext models
We have our own GlobalScopeProvider that does the trick…
Reference non Xtext models
We have our own GlobalScopeProvider that does the trick…
…we load everything and the GlobalScope contains the
corresponding EObjectDescriptions…
Reference non Xtext models
We have our own GlobalScopeProvider that does the trick…
…we load everything and the GlobalScope contains the
corresponding EObjectDescriptions…
…but it’s slow and we cannot navigate those elements in the
editor…
You can do better…
Reuse the Xtext infrastructure
Reuse the Xtext infrastructure
Bind a ResourceServiceProvider…
…so that you can put the elements in the index and make
them navigable!
Reuse the Xtext infrastructure
Bind a ResourceServiceProvider…
…so that you can put the elements in the index and make
them navigable!
GenericResourceServiceProvider
Use
It will put everything that has a name in the index…
… introduce your own ResourceDescriptionStrategy!
But the builder picks them up…
and it takes ages!
Put the index in the jar
Put the index in the jar
Why calculating the index of a static set of files?
Put the index in the jar
The index is serialisable…
…put it in the jar and load it.
Why calculating the index of a static set of files?
Index in Standalone
It’s sooo slow…
Index in Standalone
It’s sooo slow…
…of course I have my custom Standalone impl…
Index in Standalone
ResourceSetGlobalScopeProvider
Long time the
was the default.
Index in Standalone
ResourceSetGlobalScopeProvider
Long time the
was the default.
Today we can do better but you need to use it and know that
there is something new…
For Maven- and Gradleplugin it’s done.
Index in Standalone
Fill the index and install it on the ResourceSet!
Load each resource and ask the ResourceDescriptionManager
to create a ResourceDescription…
Index in Standalone
Fill the index and install it on the ResourceSet!
Load each resource and ask the ResourceDescriptionManager
to create a ResourceDescription…
Install it on the ResourceSet
Make big things run again and save your ass!
Up to 80% more faster in 10 minutes!
Codegenerators
They are sooo slow…
Codegenerators
They are sooo slow…
… of course I am using mwe2 to invoke it…
Codegenerators
They are sooo slow…
… of course I am using mwe2 to invoke it…
… even in the IDE!
Incremental generators
Incremental generators
The builder triggers the generator for each resource…
Incremental generators
The builder triggers the generator for each resource…
…when a file changes the builder computes the impact and
retriggers the generator for each affected file!
Incremental generators
The builder triggers the generator for each resource…
…when a file changes the builder computes the impact and
retriggers the generator for each affected file!
What about m:n scenarios?
Solveable with a little effort - but it is worth the work!
Incremental generators
The builder triggers the generator for each resource…
…when a file changes the builder computes the impact and
retriggers the generator for each affected file!
What about m:n scenarios?
Solveable with a little effort - but it is worth the work!
There is a ParallelBuilderParticipant…
…you have to bind it for your language…
… make sure all proxies are already resolved!
Memory consumption
Memory consumption
DisabledClusteringPolicy
Do not unload resource…
Memory consumption
DisabledClusteringPolicy
DynamicResourceClusteringPolicy
Do not unload resource…
Unload resources when there is no free memory…
…can be configured.
The NodeModel is huge
Stores the syntax tree with text and positions…
The NodeModel is huge
Stores the syntax tree with text and positions…
…is used to get the position of a specific element or
feature…
The NodeModel is huge
Stores the syntax tree with text and positions…
…is used to get the position of a specific element or
feature…
…produces a lot of Strings in memory…
The NodeModel is huge
Stores the syntax tree with text and positions…
…is used to get the position of a specific element or
feature…
…produces a lot of Strings in memory…
…and during the builder runs you do not really need
it.
Switch off the NodeModel
Switch off the NodeModel
The parser creates it …
Switch off the NodeModel
The parser creates it …
…it is used to install proxies - so you have to do that
differently…
Switch off the NodeModel
The parser creates it …
…it is used to install proxies - so you have to do that
differently…
You want to have it when the editor is used…
Switch off the NodeModel
The parser creates it …
…it is used to install proxies - so you have to do that
differently…
You want to have it when the editor is used…
… the load options should be an indicator…
Switch off the NodeModel
The parser creates it …
…it is used to install proxies - so you have to do that
differently…
You want to have it when the editor is used…
… the load options should be an indicator…
…what are the implications?
Implications
You cannot use the NodeModel in validations and
scoping any more…
Implications
You cannot use the NodeModel in validations and
scoping any more…
…Issues are marked at position 0,0…
…an EditorCallback should revalidate the content.
Implications
You cannot use the NodeModel in validations and
scoping any more…
…Issues are marked at position 0,0…
…an EditorCallback should revalidate the content.
THIS IS NOT A COMMON THING!
DO IT ONLY WHEN IT IS REALLY NECESSARY!
Order makes a difference
Order makes a difference
Files might belong together…
Order makes a difference
Files might belong together…
…and might reference each other.
Order makes a difference
Files might belong together…
…and might reference each other.
Putting them in an logical order for the builder…
Order makes a difference
Files might belong together…
…and might reference each other.
Putting them in an logical order for the builder…
… and they do not have be loaded more than once.
Order makes a difference
Files might belong together…
…and might reference each other.
Putting them in an logical order for the builder…
… and they do not have be loaded more than once.
Sometimes it makes sense to not unload them at all.
Now you know!
Professional Support
Xtext beyond the defaults -  how to tackle performance problems

Contenu connexe

Tendances

Tendances (20)

JUnit & Mockito, first steps
JUnit & Mockito, first stepsJUnit & Mockito, first steps
JUnit & Mockito, first steps
 
Mockito a simple, intuitive mocking framework
Mockito   a simple, intuitive mocking frameworkMockito   a simple, intuitive mocking framework
Mockito a simple, intuitive mocking framework
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Scoping
ScopingScoping
Scoping
 
NestJS
NestJSNestJS
NestJS
 
[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해
 
Xpath presentation
Xpath presentationXpath presentation
Xpath presentation
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Json
JsonJson
Json
 
TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
 
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
 
Json
JsonJson
Json
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
[2018] MyBatis에서 JPA로
[2018] MyBatis에서 JPA로[2018] MyBatis에서 JPA로
[2018] MyBatis에서 JPA로
 
Angular Observables & RxJS Introduction
Angular Observables & RxJS IntroductionAngular Observables & RxJS Introduction
Angular Observables & RxJS Introduction
 
Hibernate
HibernateHibernate
Hibernate
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
react-slides.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
 

En vedette

From Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextFrom Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextKarsten Thoms
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with XtextGlobalLogic Ukraine
 
Code Generation idioms with Xtend
Code Generation idioms with XtendCode Generation idioms with Xtend
Code Generation idioms with XtendHolger Schill
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to XbaseHolger Schill
 
Recipes to build Code Generators for Non-Xtext Models with Xtend
Recipes to build Code Generators for Non-Xtext Models with XtendRecipes to build Code Generators for Non-Xtext Models with Xtend
Recipes to build Code Generators for Non-Xtext Models with XtendKarsten Thoms
 
Xtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersXtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersSebastian Zarnekow
 
Graphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramGraphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramDr. Jan Köhnlein
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipsePeter Friese
 
Eclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextEclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextSebastian Zarnekow
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesUniversity of York
 
ARText - Driving Developments with Xtext
ARText - Driving Developments with XtextARText - Driving Developments with Xtext
ARText - Driving Developments with XtextSebastian Benz
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With XtextSven Efftinge
 

En vedette (20)

From Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextFrom Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with Xtext
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with Xtext
 
Code Generation idioms with Xtend
Code Generation idioms with XtendCode Generation idioms with Xtend
Code Generation idioms with Xtend
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to Xbase
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
 
Recipes to build Code Generators for Non-Xtext Models with Xtend
Recipes to build Code Generators for Non-Xtext Models with XtendRecipes to build Code Generators for Non-Xtext Models with Xtend
Recipes to build Code Generators for Non-Xtext Models with Xtend
 
EMF - Beyond The Basics
EMF - Beyond The BasicsEMF - Beyond The Basics
EMF - Beyond The Basics
 
EMF Tips n Tricks
EMF Tips n TricksEMF Tips n Tricks
EMF Tips n Tricks
 
Xtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersXtend - A Language Made for Java Developers
Xtend - A Language Made for Java Developers
 
DSLs for Java Developers
DSLs for Java DevelopersDSLs for Java Developers
DSLs for Java Developers
 
Graphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagramGraphical Views For Xtext With FXDiagram
Graphical Views For Xtext With FXDiagram
 
Jazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with EclipseJazoon 2010 - Building DSLs with Eclipse
Jazoon 2010 - Building DSLs with Eclipse
 
Graphical Views For Xtext
Graphical Views For XtextGraphical Views For Xtext
Graphical Views For Xtext
 
Eclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with XtextEclipse DemoCamp in Paris: Language Development with Xtext
Eclipse DemoCamp in Paris: Language Development with Xtext
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose Languages
 
ARText - Driving Developments with Xtext
ARText - Driving Developments with XtextARText - Driving Developments with Xtext
ARText - Driving Developments with Xtext
 
Xtext, diagrams and ux
Xtext, diagrams and uxXtext, diagrams and ux
Xtext, diagrams and ux
 
What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0What's Cooking in Xtext 2.0
What's Cooking in Xtext 2.0
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
 
Scoping Tips and Tricks
Scoping Tips and TricksScoping Tips and Tricks
Scoping Tips and Tricks
 

Similaire à Xtext beyond the defaults - how to tackle performance problems

Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?mikaelbarbero
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBJustin Smestad
 
Streams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetupStreams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetupBrian Cardiff
 
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...DroidConTLV
 
Write code that writes code!
Write code that writes code!Write code that writes code!
Write code that writes code!Jason Feinstein
 
Writing a REST Interconnection Library in Swift
Writing a REST Interconnection Library in SwiftWriting a REST Interconnection Library in Swift
Writing a REST Interconnection Library in SwiftPablo Villar
 
Elasticsearch Basics
Elasticsearch BasicsElasticsearch Basics
Elasticsearch BasicsShifa Khan
 
ElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseRobert Lujo
 
Development workflow
Development workflowDevelopment workflow
Development workflowSigsiu.NET
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than YouRobert Cooper
 
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)Apigee | Google Cloud
 
How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)Maarten Balliauw
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and HowMike Wilcox
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 
Nuxeo Platform 6.0 - What's New - November 2014
Nuxeo Platform 6.0 - What's New - November 2014Nuxeo Platform 6.0 - What's New - November 2014
Nuxeo Platform 6.0 - What's New - November 2014Nuxeo
 

Similaire à Xtext beyond the defaults - how to tackle performance problems (20)

Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Streams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetupStreams of information - Chicago crystal language monthly meetup
Streams of information - Chicago crystal language monthly meetup
 
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
 
Write code that writes code!
Write code that writes code!Write code that writes code!
Write code that writes code!
 
Writing a REST Interconnection Library in Swift
Writing a REST Interconnection Library in SwiftWriting a REST Interconnection Library in Swift
Writing a REST Interconnection Library in Swift
 
Elasticsearch Basics
Elasticsearch BasicsElasticsearch Basics
Elasticsearch Basics
 
ElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document database
 
The State of Wicket
The State of WicketThe State of Wicket
The State of Wicket
 
Play framework
Play frameworkPlay framework
Play framework
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Development workflow
Development workflowDevelopment workflow
Development workflow
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than You
 
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)
Building a Mobile Data Platform with Cassandra - Apigee Under the Hood (Webcast)
 
How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and How
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Nuxeo Platform 6.0 - What's New - November 2014
Nuxeo Platform 6.0 - What's New - November 2014Nuxeo Platform 6.0 - What's New - November 2014
Nuxeo Platform 6.0 - What's New - November 2014
 

Dernier

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 

Dernier (20)

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 

Xtext beyond the defaults - how to tackle performance problems

  • 1. Xtext beyond the defaults How to tackle performance problems
  • 2. Who is that guy?
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Xtext defaults are a good start! But one size does not fit all!
  • 8. Xtext defaults are a good start! But one size does not fit all! Amount of DSLs increases
  • 9. Xtext defaults are a good start! But one size does not fit all! Amount of DSLs increases Files get bigger
  • 10. Xtext defaults are a good start! But one size does not fit all! Amount of DSLs increases Files get bigger Amount of files increases
  • 11. Xtext defaults are a good start! But one size does not fit all! Amount of DSLs increases Files get bigger Amount of files increases Many cross references
  • 12. Xtext defaults are a good start! But one size does not fit all! Amount of DSLs increases Files get bigger Amount of files increases Many cross references Maybe transitive cross references…
  • 13. Look what we have build!
  • 14. Look what we have build! More than 20 DSLs…
  • 15. Look what we have build! More than 20 DSLs… and 200.000 lines in one file…
  • 16. Look what we have build! More than 20 DSLs… and 200.000 lines in one file… and we can check in broken models…
  • 17. Look what we have build! More than 20 DSLs… and 200.000 lines in one file… and we can check in broken models… and we generate the missing stuff…
  • 18. Look what we have build! More than 20 DSLs… and 200.000 lines in one file… and we can check in broken models… and we generate the missing stuff… to make them valid again!
  • 19. Look what we have build! More than 20 DSLs… and 200.000 lines in one file… We are on Xtext 2.6.2 and can’t update! and we can check in broken models… and we generate the missing stuff… to make them valid again!
  • 20. Look what we have build! More than 20 DSLs… and 200.000 lines in one file… We are on Xtext 2.6.2 and can’t update! and we can check in broken models… and we generate the missing stuff… to make them valid again! Could you please back-port the changes?
  • 21. Everything is sooo slow!!! Xtext sucks!!!
  • 22. Finally think about improving the situation!
  • 23. Update to newest Xtext Version 2.10.x
  • 24. Update to newest Xtext Version 2.10.x Xtext 2.11 released early 2017
  • 25. Why should I update???
  • 27. Because…we killed bugs… Let workarounds not last forever!
  • 33. …let’s work together. It was never easier to contribute! We are on G ithub :-D
  • 35. Most problems happen in… …Index and scoping… …Memory consumption. Validations… … Complex generators…
  • 36. I need Xbase in every language…
  • 37. I need Xbase in every language… … because my language is complicated…
  • 38. I need Xbase in every language… … because my language is complicated… … no I can’t explain why…
  • 39. I need Xbase in every language… … because my language is complicated… … no I can’t explain why… … but there is this small corner case…
  • 40. Is a FAST validation really fast…
  • 41. Is a FAST validation really fast… … it’s triggered every time I stop typing
  • 42. Scoping is sooo complicated…
  • 43. Scoping is sooo complicated… … I heard that in nearly every project…
  • 44. Scoping is sooo complicated… … I heard that in nearly every project… …and people stop improving things when it work’s for the first time…
  • 45. Scoping is sooo complicated… … I heard that in nearly every project… …and people stop improving things when it work’s for the first time… … code is not touched any more because who knows…
  • 46. Scoping is sooo complicated… … I heard that in nearly every project… …and people stop improving things when it work’s for the first time… … code is not touched any more because who knows… … it worked before you touched it!
  • 47. What’s the problem? LocalScope GlobalScope ImportScopeTypeScope Caches everywhere The Index Lazylinking EcoreUtils.resolveAll should do the trick! DerivedState ContainerState BatchLinkableResource
  • 52. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher…
  • 53. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher… …in a reflective way…
  • 54. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher… and if grammar changed it might not get called any more… …in a reflective way…
  • 55. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher… and if grammar changed it might not get called any more… …in a reflective way… …BECAUSE IT’S SLOW!
  • 56. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher… and if grammar changed it might not get called any more… …in a reflective way… …BECAUSE IT’S SLOW! Implement getScope(EObject context, EReference ref) if(context instanceof Element && ref == MyPackage.Literals.ELEMENT_FEATURE) up to 10 %
  • 57. Scoping API scope_Element_feature(Element element ,EReference ref) Called by the PolymorphicDispatcher… and if grammar changed it might not get called any more… …in a reflective way… …BECAUSE IT’S SLOW! Implement getScope(EObject context, EReference ref) if(context instanceof Element && ref == MyPackage.Literals.ELEMENT_FEATURE) up to 10 %Will not work with Xbase anyway…
  • 58. Use caches in the ScopeProvider
  • 59. Use caches in the ScopeProvider For each cross reference the ScopeProvider gets asked…
  • 60. Use caches in the ScopeProvider …and it calculates the very same stuff over and over again… For each cross reference the ScopeProvider gets asked…
  • 61. Use caches in the ScopeProvider …and it calculates the very same stuff over and over again… For each cross reference the ScopeProvider gets asked… …cache the calculated stuff and invalidate it when necessary!
  • 62. Use caches in the ScopeProvider …and it calculates the very same stuff over and over again… For each cross reference the ScopeProvider gets asked… …cache the calculated stuff and invalidate it when necessary! The cache of the GlobalScope should be the index and nothing else!
  • 63. Use the force of the Index
  • 64. Use the force of the Index Holds all lightweight representations of referenceable elements and their resources
  • 65. Use the force of the Index Holds all lightweight representations of referenceable elements and their resources It’s a HashMap… It’s super fast since Xtext 2.x and improved further
  • 66. Holds all lightweight representations of referenceable elements and their resources Use the force of the Index It’s a HashMap… It’s super fast since Xtext 2.x and improved further It’s YOUR Index - you can put data in…!
  • 67. Index - how to feed it
  • 68. Index - how to feed it 1. Builder picks up DSL files and loads them one by one
  • 69. Index - how to feed it 1. Builder picks up DSL files and loads them one by one 2. Creates ResourceDescriptions through ResourceDescriptionManager
  • 70. Index - how to feed it 1. Builder picks up DSL files and loads them one by one 2. Creates ResourceDescriptions through ResourceDescriptionManager 3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to create EObjectDescriptions
  • 71. Index - how to feed it 1. Builder picks up DSL files and loads them one by one 2. Creates ResourceDescriptions through ResourceDescriptionManager 3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to create EObjectDescriptions You have to bind a custom impl for the ResourceDescriptionsStrategy in the RuntimeModule
  • 72. Index - how to feed it 1. Builder picks up DSL files and loads them one by one 2. Creates ResourceDescriptions through ResourceDescriptionManager 3. ResourceDescriptionManager calls ResourceDescriptionsStrategy to create EObjectDescriptions You have to bind a custom impl for the ResourceDescriptionsStrategy in the RuntimeModule The default creates a EObjectDescription for EVERY Element that has a name…
  • 73. IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData) Information hiding and userData
  • 74. IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData) Information hiding and userData
  • 75. IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData) Information hiding and userData
  • 76. IEObjectDescription create(String simpleName, EObject element, Map<String, String> userData) Information hiding and userData Save memory & time
  • 78. UserData - what for? Validation Don’t load the world to get informations - put them in the index
  • 79. UserData - what for? Validation Don’t load the world to get informations - put them in the index Scoping Don’t resolve proxies for simple informations
  • 81. Reference non Xtext models We have our own GlobalScopeProvider that does the trick…
  • 82. Reference non Xtext models We have our own GlobalScopeProvider that does the trick… …we load everything and the GlobalScope contains the corresponding EObjectDescriptions…
  • 83. Reference non Xtext models We have our own GlobalScopeProvider that does the trick… …we load everything and the GlobalScope contains the corresponding EObjectDescriptions… …but it’s slow and we cannot navigate those elements in the editor… You can do better…
  • 84. Reuse the Xtext infrastructure
  • 85. Reuse the Xtext infrastructure Bind a ResourceServiceProvider… …so that you can put the elements in the index and make them navigable!
  • 86. Reuse the Xtext infrastructure Bind a ResourceServiceProvider… …so that you can put the elements in the index and make them navigable! GenericResourceServiceProvider Use It will put everything that has a name in the index… … introduce your own ResourceDescriptionStrategy!
  • 87. But the builder picks them up… and it takes ages!
  • 88. Put the index in the jar
  • 89. Put the index in the jar Why calculating the index of a static set of files?
  • 90. Put the index in the jar The index is serialisable… …put it in the jar and load it. Why calculating the index of a static set of files?
  • 92. Index in Standalone It’s sooo slow… …of course I have my custom Standalone impl…
  • 94. Index in Standalone ResourceSetGlobalScopeProvider Long time the was the default. Today we can do better but you need to use it and know that there is something new… For Maven- and Gradleplugin it’s done.
  • 95. Index in Standalone Fill the index and install it on the ResourceSet! Load each resource and ask the ResourceDescriptionManager to create a ResourceDescription…
  • 96. Index in Standalone Fill the index and install it on the ResourceSet! Load each resource and ask the ResourceDescriptionManager to create a ResourceDescription… Install it on the ResourceSet
  • 97. Make big things run again and save your ass! Up to 80% more faster in 10 minutes!
  • 99. Codegenerators They are sooo slow… … of course I am using mwe2 to invoke it…
  • 100. Codegenerators They are sooo slow… … of course I am using mwe2 to invoke it… … even in the IDE!
  • 102. Incremental generators The builder triggers the generator for each resource…
  • 103. Incremental generators The builder triggers the generator for each resource… …when a file changes the builder computes the impact and retriggers the generator for each affected file!
  • 104. Incremental generators The builder triggers the generator for each resource… …when a file changes the builder computes the impact and retriggers the generator for each affected file! What about m:n scenarios? Solveable with a little effort - but it is worth the work!
  • 105. Incremental generators The builder triggers the generator for each resource… …when a file changes the builder computes the impact and retriggers the generator for each affected file! What about m:n scenarios? Solveable with a little effort - but it is worth the work! There is a ParallelBuilderParticipant… …you have to bind it for your language… … make sure all proxies are already resolved!
  • 108. Memory consumption DisabledClusteringPolicy DynamicResourceClusteringPolicy Do not unload resource… Unload resources when there is no free memory… …can be configured.
  • 109. The NodeModel is huge Stores the syntax tree with text and positions…
  • 110. The NodeModel is huge Stores the syntax tree with text and positions… …is used to get the position of a specific element or feature…
  • 111. The NodeModel is huge Stores the syntax tree with text and positions… …is used to get the position of a specific element or feature… …produces a lot of Strings in memory…
  • 112. The NodeModel is huge Stores the syntax tree with text and positions… …is used to get the position of a specific element or feature… …produces a lot of Strings in memory… …and during the builder runs you do not really need it.
  • 113. Switch off the NodeModel
  • 114. Switch off the NodeModel The parser creates it …
  • 115. Switch off the NodeModel The parser creates it … …it is used to install proxies - so you have to do that differently…
  • 116. Switch off the NodeModel The parser creates it … …it is used to install proxies - so you have to do that differently… You want to have it when the editor is used…
  • 117. Switch off the NodeModel The parser creates it … …it is used to install proxies - so you have to do that differently… You want to have it when the editor is used… … the load options should be an indicator…
  • 118. Switch off the NodeModel The parser creates it … …it is used to install proxies - so you have to do that differently… You want to have it when the editor is used… … the load options should be an indicator… …what are the implications?
  • 119. Implications You cannot use the NodeModel in validations and scoping any more…
  • 120. Implications You cannot use the NodeModel in validations and scoping any more… …Issues are marked at position 0,0… …an EditorCallback should revalidate the content.
  • 121. Implications You cannot use the NodeModel in validations and scoping any more… …Issues are marked at position 0,0… …an EditorCallback should revalidate the content. THIS IS NOT A COMMON THING! DO IT ONLY WHEN IT IS REALLY NECESSARY!
  • 122. Order makes a difference
  • 123. Order makes a difference Files might belong together…
  • 124. Order makes a difference Files might belong together… …and might reference each other.
  • 125. Order makes a difference Files might belong together… …and might reference each other. Putting them in an logical order for the builder…
  • 126. Order makes a difference Files might belong together… …and might reference each other. Putting them in an logical order for the builder… … and they do not have be loaded more than once.
  • 127. Order makes a difference Files might belong together… …and might reference each other. Putting them in an logical order for the builder… … and they do not have be loaded more than once. Sometimes it makes sense to not unload them at all.