Posts [ 4 ]

Topic: Speeding up rails environment loading

Hi there,

I am running a rails website, where users can trigger several ruby scripts. Each of which loads the rails environment and does stuff. However, loading the rails environment is very slow (several seconds for each script). Is there a way to speed things up? Of course, I could put all my scripts in one file, so that only one rails environment gets loaded, but I dont want to do that. I could also use ActiveRecord and not Rails, which would suffice for my purposes, but would also blow up the code...

Is there any nice and easy way to speed up the process of loading the rails environment in external scripts?

Re: Speeding up rails environment loading

I'm having a similar issue. After upgrading to rails 2.3.4 and ruby 1.8.7 it takes a very long time (>5 seconds) for my rails app to load classes. It runs very fast in production mode after the classes have been cached. I have tried this on both passenger and mongrel. Any ideas?