Ben Evans wrote:
Do you have any thoughts yet about how we might want to split up
jruby.jar to provide a smaller jar which is just the bare minimum needed
for using Java types which have been produced by compiler2 ?
It seems to me that starting that refactor and splitting up might be
easier whilst compiler2 is still in a prototype stage, rather than doing
it after the fact.
It probably won't make much difference before versus after, since
compiler2 does no more than current Java integration does. It
essentially just creates a set of "dummy" Java methods that dynamically
dispatch to the correct Ruby method, using normal Java integration type
coercion throughout. I'm not too worried about compiler2 encumbering
JRuby or limiting future shrinking possibilities.
But I have been thinking about how to minimize the jar, definitely. A
large part of the size is from all the little classes we generated for
method dispatch, so one way would be to use reflection for calls. That
would mean we could eliminate all those little classes, but it would
slow down dispatch quite a bit.
Another option would be enerating the invokers in batched classes of
ten, with numbering from call0 up to call9. That would reduce the number
of individual classes we have to ship, and probably wouldn't be too
difficult to do.
There's also libraries that may not make sense in some environments,
like all the FFI/native stuff you couldn't use in an applet. And Java
integration code can certainly be shrunk a lot.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email