|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
JVM options automatically passedI notice that when I run my Ruby apps, that these options are
automatically passed: ""C:\Program Files\Java\jdk1.6.0_05\jre\bin\java" -Xverify:none -da -Xmx512m -Xss1024k ... -Djruby.script=jruby.bat org.jruby.Main -IC:\NetBeansProjects\RubyApplication1\lib 1. So, there is no need to tell people to set -Xverify:none as this is done already, correct? Instead I should say that it is set for them? 2. Where does NetBeans decide to pass these options. Is this hard coded? Is it customizable? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: JVM options automatically passedChris Kutler wrote:
> I notice that when I run my Ruby apps, that these options are > automatically passed: > > ""C:\Program Files\Java\jdk1.6.0_05\jre\bin\java" -Xverify:none -da > -Xmx512m -Xss1024k ... -Djruby.script=jruby.bat org.jruby.Main > -IC:\NetBeansProjects\RubyApplication1\lib > > 1. So, there is no need to tell people to set -Xverify:none as this is > done already, correct? Instead I should say that it is set for them? I'm rather curious why do you want to tell people about this? It's actually rather scary information, that no much Ruby developers wants to know about ;). Even not much Java developers uses/knows this switch. I guess JRuby uses it to have faster start-up or something. > 2. Where does NetBeans decide to pass these options. Is this hard coded? > Is it customizable? It is hard-coded. It was added by Tor in the beginning of Ruby IDE. I guess and the reason is that this is done by 'jruby' script (which you normally use from command line) as well. And since we simulate 'jruby' script with 'java' command ('why' is described in another thread), we do so as well. I'm not against describing this somewhere as (really) advance topic. For real reasons why the JRuby skips bytecode verification the only best place is JRuby MLs. It's for speed reason but details know the JRuby guys. m. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: JVM options automatically passed
Martin Krauskopf wrote:
Chris Kutler wrote:Why is it scary? Why then do we have a FAQ about it? http://wiki.netbeans.org/FaqHowToCallJavaFromRuby. That is why I am talking about it, and that is how I discovered that it is being used by default. I looked at the JRuby startup script and I am not sure how that arg gets passed in. I know what it does and some people recommend it and some recommend against it (see below). However if you think we should remove the faq and not mention the fact that we are using it in the IDE, let me know and I will do so. Sources: http://blog.nicksieger.com/articles/2008/06/01/jruby-q-a-at-railsconf
I just committed a change to the JRuby startup scripts that boosts startup speed by almost 70% (for me). It loads the JRuby jars (and CLASSPATH) into bootclasspath instead of normal classpath, bypassing verification (and apparently other things, since this is way faster than -Xverify:none). It should also be a safe change; JRuby's core should have been verified a kajillion times before release, and code generated at runtime will be verified as normal.
|
|
|
Re: JVM options automatically passedChris Kutler wrote:
> Martin Krauskopf wrote: >> Chris Kutler wrote: >>> I notice that when I run my Ruby apps, that these options are >>> automatically passed: >>> >>> ""C:\Program Files\Java\jdk1.6.0_05\jre\bin\java" -Xverify:none -da >>> -Xmx512m -Xss1024k ... -Djruby.script=jruby.bat org.jruby.Main >>> -IC:\NetBeansProjects\RubyApplication1\lib >>> >>> 1. So, there is no need to tell people to set -Xverify:none as this >>> is done already, correct? Instead I should say that it is set for them? >> >> I'm rather curious why do you want to tell people about this? It's >> actually rather scary information, that no much Ruby developers wants >> to know about ;). > Why is it scary? Because it is low-level tweak. And as you pointed below (BTW thanks for that point, see below), JRuby guys took it away in JRuby 1.1 and switch to other mechanism (low-level implementation detail in the same way). User just want to run 'jruby' from CLI and 'Shift-F6' from NetBeans. Then the few others curious users might want to know how tweak JRuby further and I think that e.g. -Xmx or -Djruby.objectspace.enabled are much better example then -Xverify:none. -Xverify none will be likely explicitly used by 1/1000 developers - my guess. > Why then do we have a FAQ about it? > http://wiki.netbeans.org/FaqHowToCallJavaFromRuby. That is why I am > talking about it, and that is how I discovered that it is being used by > default. The FAQ shall be about JRUBY_EXTRA_VM_ARGS, not about -Xverify:none. -Xverify:none was just used as a (bad) example. I'll handle the FAQ, likely it will gets obsolete for 6.5. I'll let you know. > I looked at the JRuby startup script and I am not sure how that arg gets > passed in. See below. > Sources: > > http://blog.nicksieger.com/articles/2008/06/01/jruby-q-a-at-railsconf > > * -Xbootclasspath: VM does not verify classes in the “boot” classpath > * -Xverify:none is not recommended because of runtime-generated code > > http://www.mail-archive.com/dev@.../msg03249.html Thanks for pointing to this. So we are now simulating start-up as it was done for JRuby 1.0.3. We should switch to the simulation of newer script, in version 1.1.x. I'll file an issue for myself. Thanks for the catch. m. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: JVM options automatically passedYou have been very helpful. I am doing a major rewrite of that section now.
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |