Home » Modeling » TMF (Xtext) » Mac OS X very slow
| | | |
Re: Mac OS X very slow [message #1393922 is a reply to message #1393772] |
Fri, 04 July 2014 13:40 |
Henrik Lindberg 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 |
mcse mcse 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 |
Henrik Lindberg 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 |
|
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Goto Forum:
Current Time: Sat Apr 20 06:07:38 GMT 2024
Powered by FUDForum. Page generated in 0.03887 seconds
|