Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Mac OS X very slow
Mac OS X very slow [message #1393772] Fri, 04 July 2014 08:44 Go to next message
mcse mcse is currently offline mcse mcseFriend
Messages: 53
Registered: August 2012
Member
Hi All,

I just want to share my experience with using Eclipse Xtext with my Apple Mac pro. Eclipse Xtext works "extremely" slowly compared with their performance in a linux machine. Whenever I attempt to edit my Xtend code, Eclipse in Mac OS got frozen and then fails. It simply does not let me edit my Xtend code, while I can when I use my linux machine.
I must admit that the code is quite large (i.e., 7000 lines). However, it is very strange that the Mac OS form of the Eclipse Xtext framework is extremely slow relatively to the Linux forms. I believed that the performance updates are neglected for Mac Os form of Eclipse Xtext.
Re: Mac OS X very slow [message #1393825 is a reply to message #1393772] Fri, 04 July 2014 10:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6534
Registered: July 2009
Senior Member
Hi

Most Eclipse projects are independent of the underlying operating
system, although stupidities such as line endings occasionally arise.

More likely there is something wrong with the/your start-up so that on
the Mac you have inadequate resources causing the flaky and slow
behavior. Use a VM monitor such as Visual VM to see what is happening.

Regards

Ed Willink



On 04/07/2014 09:44, mcse mcse wrote:
> Hi All,
>
> I just want to share my experience with using Eclipse Xtext with my
> Apple Mac pro. Eclipse Xtext works "extremely" slowly compared with
> their performance in a linux machine. Whenever I attempt to edit my
> Xtend code, Eclipse in Mac OS got frozen and then fails. It simply
> does not let me edit my Xtend code, while I can when I use my linux
> machine. I must admit that the code is quite large (i.e., 7000 lines).
> However, it is very strange that the Mac OS form of the Eclipse Xtext
> framework is extremely slow relatively to the Linux forms. I believed
> that the performance updates are neglected for Mac Os form of Eclipse
> Xtext.
Re: Mac OS X very slow [message #1393828 is a reply to message #1393825] Fri, 04 July 2014 10:29 Go to previous messageGo to next message
mcse mcse is currently offline mcse mcseFriend
Messages: 53
Registered: August 2012
Member
Hi Ed,
Thanks a lot for the response.

Yes, what you said totally makes sense. There must be a limited memory space separated for Eclipse Xtext, hindering its practical use.
Can you also suggest me a way to increase the memory separated for Eclipse Xtext?
Re: Mac OS X very slow [message #1393862 is a reply to message #1393828] Fri, 04 July 2014 11:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6534
Registered: July 2009
Senior Member
Hi

No idea. I never use Mac.

Try http://wiki.eclipse.org/Eclipse.ini

Regards

Ed Willink


On 04/07/2014 11:29, mcse mcse wrote:
> Hi Ed,
> Thanks a lot for the response.
>
> Yes, what you said totally makes sense. There must be a limited memory
> space separated for Eclipse Xtext, hindering its practical use. Can
> you also suggest me a way to increase the memory separated for
> Eclipse Xtext?
Re: Mac OS X very slow [message #1393922 is a reply to message #1393772] Fri, 04 July 2014 13:40 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2014-04-07 10:44, mcse mcse wrote:
> Hi All,
>
> I just want to share my experience with using Eclipse Xtext with my
> Apple Mac pro. Eclipse Xtext works "extremely" slowly compared with
> their performance in a linux machine. Whenever I attempt to edit my
> Xtend code, Eclipse in Mac OS got frozen and then fails. It simply does
> not let me edit my Xtend code, while I can when I use my linux machine.
> I must admit that the code is quite large (i.e., 7000 lines). However,
> it is very strange that the Mac OS form of the Eclipse Xtext framework
> is extremely slow relatively to the Linux forms. I believed that the
> performance updates are neglected for Mac Os form of Eclipse Xtext.

IIRC, Eclipse for OSx has 512M memory configured. This is almost always
not enough.

If your issue is that generation of code from the grammar is slow, then
change the VM settings for the mwe task. Here is instructions for how we
do it (we keep the generation in a separate bundle, but I am sure you
can translate this to your setup).
https://github.com/puppetlabs/geppetto/wiki/Contributing-to-Geppetto#regenerating-the-parser

If your problem is that Eclipse in general is too slow, then you need to
open up the content of the Eclipse App, and find the VM configuration
and add more memory there. This is often required for the reason of
running out of perm gen space.

Hope this helps you.

- henrik
Re: Mac OS X very slow [message #1393969 is a reply to message #1393922] Fri, 04 July 2014 15:15 Go to previous messageGo to next message
mcse mcse is currently offline mcse mcseFriend
Messages: 53
Registered: August 2012
Member
Hi Henrik,

Thanks a lot for your reply; indeed it was helpful.
My problem is that when I try to edit the code generator (i.e., the xtend file in my Xtext project), the eclipse becomes extremely slow. For instance, when I wanted to write a code to obtain a specification matching a particular syntax rule, the eclipse gets frozen immediately, which is sometimes followed by an error of resource-allocation. I guess that the problem here is about the default memory space separated for eclipse, i.e., 512 MB. I should make it much bigger, e.g., 3000MB, as my grammar and code generator are huge in size.

Re: Mac OS X very slow [message #1394042 is a reply to message #1393969] Fri, 04 July 2014 17:43 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2014-04-07 17:15, mcse mcse wrote:
> Hi Henrik,
>
> Thanks a lot for your reply; indeed it was helpful.
> My problem is that when I try to edit the code generator (i.e., the
> xtend file in my Xtext project), the eclipse becomes extremely slow. For
> instance, when I wanted to write a code to obtain a specification
> matching a particular syntax rule, the eclipse gets frozen immediately,
> which is sometimes followed by an error of resource-allocation. I guess
> that the problem here is about the default memory space separated for
> eclipse, i.e., 512 MB. I should make it much bigger, e.g., 3000MB, as my
> grammar and code generator are huge in size.
>
As you can see, I used 3000Mb for my grammar too. It is both much
faster, and the result is more accurate (when using a complex grammar
with backtracking).

- henrik
Re: Mac OS X very slow [message #1394053 is a reply to message #1393969] Fri, 04 July 2014 18:09 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 04/07/2014 17:15, mcse mcse wrote:
> Hi Henrik,
>
> Thanks a lot for your reply; indeed it was helpful.
> My problem is that when I try to edit the code generator (i.e., the
> xtend file in my Xtext project), the eclipse becomes extremely slow. For
> instance, when I wanted to write a code to obtain a specification
> matching a particular syntax rule, the eclipse gets frozen immediately,
> which is sometimes followed by an error of resource-allocation. I guess
> that the problem here is about the default memory space separated for
> eclipse, i.e., 512 MB. I should make it much bigger, e.g., 3000MB, as my
> grammar and code generator are huge in size.
>

Hi

I had a few issues with editing Xtend files in Eclipse as well, just as
you described... I'm not using Mac (I'm using Linux) and since I run
Eclipse from the command line, I happened to note a warning from Java
about ReservedCodeCacheSize...

apparently, adding these lines in eclipse.ini solved the problem for me

-vmargs
-XX:ReservedCodeCacheSize=64m
-Xms40m
-Xmx1024m

you might want to have a try yourself
hope this helps
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:Import and use Ecore model using importURI
Next Topic:Could not find unique type in ImportingTypesProposalProvider
Goto Forum:
  


Current Time: Fri Dec 06 17:39:07 GMT 2019

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

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

Back to the top