Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext editors take a long time to open
Xtext editors take a long time to open [message #896916] Fri, 20 July 2012 12:30 Go to next message
Aaron Digulla is currently offline Aaron DigullaFriend
Messages: 258
Registered: July 2009
Location: Switzerland
Senior Member
Maybe you have noticed that it can take several seconds until Xtext opens an editor. This is due to the code in XtextResourceSetProvider which loads all MANIFEST.MF files on the classpath and creates an URI-to-URI map.

Alex Ruiz found out that you can avoid this hang by binding IResourceSetProvider to SimpleResourceSetProvider (see his blog)

Can someone from the Xtext team comment what XtextResourceSetProvider is supposed to do? Maybe the data could be cached or the whole code could be removed because many editors work without it.

Regards,

A. Digulla
Re: Xtext editors take a long time to open [message #896936 is a reply to message #896916] Fri, 20 July 2012 13:31 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Aaron,

did you try the patch by Alex. Did it improve the situation on your site?
The code will usually not cause a significant delay. However, at google
they have literally 1000s of jars on the classpath of their projects
thus it takes some time to extract the mainfest.
The code in the XtextResourceSetProvider maps the actual plugins in your
*target* platform to the platform:/plugin scheme instead of the plugins
in your running Eclipse instance - that you cannot refer to anyway.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 20.07.12 14:30, schrieb Aaron Digulla:
> Maybe you have noticed that it can take several seconds until Xtext
> opens an editor. This is due to the code in XtextResourceSetProvider
> which loads all MANIFEST.MF files on the classpath and creates an
> URI-to-URI map.
>
> Alex Ruiz found out that you can avoid this hang by binding
> IResourceSetProvider to SimpleResourceSetProvider
> (http://alexruiz.developerblogs.com/?p=2359)
>
> Can someone from the Xtext team comment what XtextResourceSetProvider is
> supposed to do? Maybe the data could be cached or the whole code could
> be removed because many editors work without it.
>
> Regards,
>
> A. Digulla
Re: Xtext editors take a long time to open [message #897231 is a reply to message #896936] Mon, 23 July 2012 10:11 Go to previous message
Aaron Digulla is currently offline Aaron DigullaFriend
Messages: 258
Registered: July 2009
Location: Switzerland
Senior Member
Sebastian Zarnekow wrote on Fri, 20 July 2012 15:31

did you try the patch by Alex. Did it improve the situation on your site?


Yes and yes. I have 79 JARs on the classpath and some were converted from Eclipse bundles, so the code does find many MANIFEST.MF that it can process.

At first glance, I don't see why the code is slow (reading 79 manifests from JARs on the classpath shouldn't take that long) but for some reason, this causes a noticeable lag. The editors open much slower than, say, a Java editor which causes me to wonder "Did it register the double-click? Why does it hang? Is something wrong?"

Sebastian Zarnekow wrote on Fri, 20 July 2012 15:31

The code in the XtextResourceSetProvider maps the actual plugins in your
*target* platform to the platform:/plugin scheme instead of the plugins
in your running Eclipse instance - that you cannot refer to anyway.


I see. Isn't that only useful while developing Xtext editors?

I'm wondering if there was a way to disable this or provide some way of caching :-/

Regards,

A. Digulla
Previous Topic:manage the String type and what is generated from my dsl Grammar
Next Topic:Order if content assist items
Goto Forum:
  


Current Time: Thu Apr 25 07:36:55 GMT 2024

Powered by FUDForum. Page generated in 0.03676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top