This would be great! :)

Cheers,
Robert


Ola Bini wrote:

Hi,

Jon Tirsen proposed that a nice thing for Goldspike would be to share the AST's between runtimes, to avoid the huge memory impact and performance of loading Rails over and over again for a new runtime.

I'm wondering whether this is something we should do. Basically, we could implement org.jruby.Ruby.clone, which would return copies of everything in the current runtime, except that all AST links points to the same AST as the first one.

To make this feasible, we would need to remove runtime dependent information from the AST. As far as I can see, there are only three nodes which cache information of some sort connected to a runtime:

FixnumNode
RegexpNode
ReturnNode (target)

Now, both FixnumNode and RegexpNode would be quite easy to exteralize into some other cache outside the AST. The main problem would be the ReturnNode, where target is a RubyObject (I think).

Anyone have any opinionss? Would it be worth doing?

Cheers


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to