Download - Responsiveness
• If you cannot parallelize, make it cancelable • CancelableUnitOfWork • OutdatedStateManager#checkOutdated
• OperationCanceledManager transforms exceptions
Cancelation
• IXtextDocument#priorityReadOnly • for fast UI services, e.g. content assist • cancels current document readers • executes action • restarts model listeners
Priority Read
Transactions
• 10yo bug finally fixed in Mars • JobManager#isBlocking didn’t consider thread jobs • Auto-build no longer blocks a save operation
BUG 60964
• 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
• Don’t guess – measure! • Use a profiler, not the system clock
• But don’t trust your measurements!
The Profiling
Koan
• Check CancelIndicators and ProgressMonitors frequently
• Avoid calculation in the UI thread • Careful with ProgressMonitor progress reporting • Use BackgroundOutlineTreeProvider
Mastering the GUI
• 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
• Keep an eye on algorithmic complexity • Prefer index-based NamesAreUniqueValidator • Avoid unnecessary loading of external resources • Use CheckType.NORMAL
Validation KUNG-FU
• Avoid using long chains of binary operations • Explicitly state types when necessary
Xbase Workout
• Avoid clustering – increase memory instead • Use StorageAwareResource • Reduce number of indexed elements • Use parallel code generator • Maven: Avoid composite update sites
Builder Katas