Forum: Ruby on Rails Rails runtime

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
29668d9eaaf486727a446f7d03c59f07?d=identicon&s=25 Camille Roux (camilleroux)
on 2009-01-28 17:36
Hi,

I've a question about the Rails runtime.
I'd like to know which part of Rails is executed (and put in memory) at
each request? at each server launch?
In other words, is Rails like PHP (the whole code is "executed" at each
request)?

Thanx
Camille Roux
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-01-28 18:10
(Received via mailing list)
On 28 Jan 2009, at 16:36, Camille Roux wrote:

>
> Hi,
>
> I've a question about the Rails runtime.
> I'd like to know which part of Rails is executed (and put in memory)
> at
> each request? at each server launch?
> In other words, is Rails like PHP (the whole code is "executed" at
> each
> request)?

All of your app code (and the framework) is loaded when the mongrel,
passenger instance etc. is launched (passenger can do clever things
with fork if you're using REE).

Fred
C64e63b70be7dfed8b0742540b8b27e5?d=identicon&s=25 Mark Reginald James (Guest)
on 2009-01-29 04:51
(Received via mailing list)
Camille Roux wrote:

> I've a question about the Rails runtime.
> I'd like to know which part of Rails is executed (and put in memory) at
> each request? at each server launch?
> In other words, is Rails like PHP (the whole code is "executed" at each
> request)?

On on start-up in production mode a Rails app will load, execute,
and cache the Rails framework plus certain parts of the app code.
The rest of the app code is loaded and cached on-demand when an
unknown class or module is referenced during a request.

--
Rails Wheels - Find Plugins, List & Sell Plugins -
http://railswheels.com
This topic is locked and can not be replied to.