[MacRuby-devel] Using compiled MacRuby objects from an Objective-C application

Laurent Sansonetti lsansonetti at apple.com
Sun Dec 26 17:36:29 PST 2010


Hi Justin,

On Dec 23, 2010, at 2:27 PM, Justin Schumacher wrote:

> Laurent,
> 
> I made the switch to rbo files.  The load time was 3.6 seconds with .rb files and 0.9 seconds with .rbo files.  That's a good improvement and is acceptable for my project for the time being.  

Does the 0.9 seconds include the startup time of the whole runtime, such as the initial call to [MacRuby sharedRuntime]? If yes, it sounds acceptable for the time being.

I have a plan to boost the startup time of the runtime within a Cocoa environment, by making BridgeSupport files loading faster, and I hope to get this in in 0.9. 

> I did notice that the Objective-C API method 'evaluateFileAtPath' cannot accept rbo files.  To load the rbo files from Objective-C, I'm using the following pattern:
> 
> [[MacRuby sharedRuntime] evaluateString:[NSString stringWithFormat:@"require '%@'", filename]];
> 
> Probably no big performance hit there, but I'm wondering if it would make sense for evaluateFileAtPath to be able to accept rbo files as well as rb files.

I think it would make sense, indeed. Could you file a ticket on our tracker?

Thanks!
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101226/600ae13f/attachment.html>


More information about the MacRuby-devel mailing list