Bug 420710 - Make the Xtext Index lazy and optional
Summary: Make the Xtext Index lazy and optional
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-30 08:31 EDT by Ed Willink CLA
Modified: 2022-03-18 08:11 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2013-10-30 08:31:20 EDT
The Xtext index can impose very heavy costs on Modeling projects; particularly those using UML that provides many version variants of large models. For many projects these costs are completely unnecessary since the Xtext Index is not required.

Prior to the index, an Xtext grammar could reference platform:/resource/.... for uninstalled models and there was no need for any further indexing.

Now Xtext requires a namespace URI and so needs to provoke this very costly search.

Suggest using a .settings file similar to that used by the QVTo project preferences so that projects may declare their own mappings from nsURI to file avoiding the need for global workspace searches for disciplined usage.

So:

when Xtext/Xtend/... resolves a reference, it first looks for the .settings file

If .settings file exists
  if resolution exists then use it
  else if resolution exists but is blank/null, start up and use Xtext index
  else if resolution for "*" exists start up and use Xtext index
  else generate warning message
else
  start up and use Xtext index

This would re-instate the normal Eclipse lazy policy of only incuring heavy costs when needed.
Comment 1 Sebastian Zarnekow CLA 2013-11-01 06:15:25 EDT
Could you elaborate on the cost that are caused by the indexing?
Are you refering to the indexing of *.ecore files? How long does that take for the mentioned packages?
Comment 2 Ed Willink CLA 2013-11-01 11:46:42 EDT
When the Xtext Index 'works' it costs about 10- seconds to index all the UML files on my classpath.

Unfortunately the Xtext Index does not work and so sometimes it loops 20 times triggering rebuilds and so a cup of coffee is called for.
Comment 3 Sebastian Zarnekow CLA 2013-11-01 11:47:59 EDT
Is there an easy way to reproduce the looping?
Comment 4 Ed Willink CLA 2013-11-01 14:21:09 EDT
No. As of M3 some platform build anomalies should go.

I was hoping that there would be some .option that could be enabled to identify the triggers for Resource Description Updates so that I could watch those.

Running in a nested Eclipse so that I can run an instrumented builder is not much fun when the triggers are difficult to understand and intermittent in behaviour.
Comment 5 Sven Efftinge CLA 2013-11-03 08:06:55 EST
(In reply to Ed Willink from comment #2)
> When the Xtext Index 'works' it costs about 10- seconds to index all the UML
> files on my classpath.

Is that *.uml files or the ecore files which define UML?
Comment 6 Ed Willink CLA 2013-11-03 08:39:53 EST
uml30.ecore is the one that glares at me particularly often from the status message.