3. • If you cannot parallelize, make it cancelable
• CancelableUnitOfWork
• OutdatedStateManager#checkOutdated
• OperationCanceledManager transforms exceptions
Cancelation
4. • IXtextDocument#priorityReadOnly
• for fast UI services, e.g. content assist
• cancels current document readers
• executes action
• restarts model listeners
Priority
Read
Transactions
5. • 10yo bug finally fixed in Mars
• JobManager#isBlocking didn’t consider thread jobs
• Auto-build no longer blocks a save operation
BUG
60964
6. • Store fully-resolved models to disk
• Node model, resolved x-refs, resolved types, index
data…
• Drastically reduces build times
• especially for Xbase languages
Storage
Aware
Resource
9. • Don’t guess – measure!
• Use a profiler, not the system clock
• But don’t trust your measurements!
The
Profiling
Koan
10. • Check CancelIndicators and ProgressMonitors
frequently
• Avoid calculation in the UI thread
• Careful with ProgressMonitor progress reporting
• Use BackgroundOutlineTreeProvider
Mastering
the GUI
11. • Avoid backtracking
• Reduce lookahead by
• adding keywords, preferably as prefix
• adding syntactic predicates
• use first-token-set predicates in complicated
lookahead scenarios
Train
your
Grammar
12. • Keep an eye on algorithmic complexity
• Prefer index-based NamesAreUniqueValidator
• Avoid unnecessary loading of external resources
• Use CheckType.NORMAL
Validation
KUNG-FU
13. • Avoid using long chains of binary operations
• Explicitly state types when necessary
Xbase
Workout
14. • Avoid clustering – increase memory instead
• Use StorageAwareResource
• Reduce number of indexed elements
• Use parallel code generator
• Maven: Avoid composite update sites
Builder
Katas