Forum: JRuby Java 8 and Invoke Dynamic on Heroku

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
58c538d6f6e8fbf54779c5607e567bff?d=identicon&s=25 John B. (john_b)
on 2015-03-18 03:14
(Received via mailing list)
My app on Heroku was previously on cedar with Java 7. I just updated to
cedar-14 and Java 8.

One thing I was wary of was big performance problems because of invoke
dynamic being set to true when JRuby detected Java 8, as described in
these
issues:

https://github.com/jruby/jruby/issues/1858
https://github.com/jruby/jruby/issues/1569

But I haven't seen any problem so far. Maybe for some reason invoke
dynamic
is actually still off for me? Is there a way I check this at runtime in
irb?

John
666badca71c452ae51c999971419b506?d=identicon&s=25 Joe Kutner (Guest)
on 2015-03-18 08:32
(Received via mailing list)
The Ruby buildpack automatically sets the JRUBY_OPTS environment
variable with -Xcompile.invokedynamic=false. So invoke dynamic will be
off by default. You can confirm this by running `heroku config`.

On Wed, Mar 18, 2015 at 3:14 AM, John Joseph Bachir
58c538d6f6e8fbf54779c5607e567bff?d=identicon&s=25 John B. (john_b)
on 2015-03-18 14:41
(Received via mailing list)
On Wed, Mar 18, 2015 at 3:30 AM, Joe Kutner <jpkutner@gmail.com> wrote:

> The Ruby buildpack automatically sets the JRUBY_OPTS environment variable
> with -Xcompile.invokedynamic=false. So invoke dynamic will be off by
> default. You can confirm this by running `heroku config`.
>

Ahh okay, that explains it. Thanks!


(Since the buildpack sets it, it can't be seem from `heroku config`, but
I
see it in my dyno environment:)

*~* *$ *env | grep JRUBY

JRUBY_OPTS=-Xcompile.invokedynamic=false

*~* *$ *env | grep JAVA

JAVA_OPTS=-Xms750m -Xmx750m -Xss512k -XX:+UseCompressedOops

JAVA_TOOL_OPTIONS=-Xmx768m -Djava.rmi.server.useCodebaseOnly=true
This topic is locked and can not be replied to.