Roger Pack <rogerpack2005@gmail.com> writes:
> Question. Currently with rails startup time in linux for me is like 6s,
> in windows like...20s, but regardless, anybody know just why this is
> taking so long (I'm pretty sure it's cpu bound--curious if anyone's
> investigated this).
> Anyone know any tricks to load things quicker?
There are two tricks:
- compile each source file into a "binary" fast loading file, and then
load them.
- load everything, then save the memory image. Next time, boot ruby
with that saved memory image, instead of an empty one.
There's also a third option:
- compile the program to a native executable.
Ooops! These options are not available to Matzacred Lisp, only in
implementations of Common Lisp, Scheme, Smalltalk, etc.
Well, theorically there's nothing that would prevent you to implement
either option in Ruby, but the fact that it's written in C instead of
Ruby. If it was written in Ruby, as a Ruby programmer you could do
something about it. Otherwise you'll have to find a C programmer and
motivate him to work on it...
There's already a Ruby parser written in Ruby, perhaps it would be
time to implement a Ruby compiler in Ruby.
--
__Pascal Bourguignon__