Topic: rails startup too slow

it take  4 or more minutes to completely start up a very simple app. just as the steps:


>rails test
>cd test
>ruby script\server

TAKE more than 4 minutes to startup.

google again and again ,i got "ruby performance validator" and try it.

result reports maybe the key point:

d:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb Line 160
method:  Rails::Initializer.require_frameworks()     used   184 secs.     


have any magic to solve it ?  thanks gods. i am getting crazily.


windows xp sp2

cpu: P4-3.0G
memery: 2G
only one console window and no other cpu consuming task and process.

>rails -v
Rails 1.2.3
>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]

>gem -v
0.9.2

>gem list
*** LOCAL GEMS ***

actionmailer (1.3.3)
    Service layer for easy email delivery and testing.

actionpack (1.13.3)
    Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.3)
    Web service support for Action Pack.

activerecord (1.15.3)
    Implements the ActiveRecord pattern for ORM.

activesupport (1.4.2)
    Support and utility classes used by the Rails framework.

fxri (0.3.6)
    Graphical interface to the RI documentation, with search engine.

fxruby (1.6.6)
    FXRuby is the Ruby binding to the FOX GUI toolkit.

hpricot (0.4)
    a swift, liberal HTML parser with a fantastic library

log4r (1.0.5)
    Log4r is a comprehensive and flexible logging library for Ruby.

rails (1.2.3)
    Web-application framework with template engine, control-flow layer,
    and ORM.

rake (0.7.2)
    Ruby based make-like utility.

sources (0.0.1)
    This package provides download sources for remote gem installation

win32-clipboard (0.4.1)
    A package for interacting with the Windows clipboard

win32-dir (0.3.1)
    Extra constants and methods for the Dir class on Windows.

win32-eventlog (0.4.3)
    Interface for the MS Windows Event Log.

win32-file (0.5.3)
    Extra or redefined methods for the File class on Windows.

win32-file-stat (1.2.3)
    A File::Stat class tailored to MS Windows

win32-process (0.5.1)
    Adds fork, wait, wait2, waitpid, waitpid2 and a special kill method

win32-sapi (0.1.3)
    An interface to the MS SAPI (Sound API) library.

win32-sound (0.4.0)
    A package for playing with sound on Windows.

windows-pr (0.6.2)
    Windows functions and constants predefined via Win32API

Re: rails startup too slow

Try using mongrel instead of webrick, and see if that is taking too long as well.

Re: rails startup too slow

Have you tried reinstalling everything? How is your windows setup? Does windows run real slow in general? Do you have something thats slowing your computer up a lot like two anti virus's installed? That 4 minutes doesn't sound right...

Re: rails startup too slow

Try switching to Mac tongue

Re: rails startup too slow

Rober77 wrote:

Have you tried reinstalling everything? How is your windows setup? Does windows run real slow in general? Do you have something thats slowing your computer up a lot like two anti virus's installed? That 4 minutes doesn't sound right...

i reinstall the ruby and rails gems but without windows system reinstall.

my application runs well such as eclipse , firefox etc. i never feel slow.  only ROR sunk.

only use Symantec AntiVirus, no fireware.

Last edited by bus387 (2007-08-01 12:30:52)

Re: rails startup too slow

learc83 wrote:

Try using mongrel instead of webrick, and see if that is taking too long as well.

mongrel looks the same with webrick.

little improvement.

Re: rails startup too slow

I play with Rails a little on my work machine which has XP and it definitely starts up in under 10 seconds and it's an old T43!  What about Ruby itself - can you start up irb quickly for example?  If your computer can startup eclipse quickly then rails should not be a problem.

Re: rails startup too slow

sthapit wrote:

I play with Rails a little on my work machine which has XP and it definitely starts up in under 10 seconds and it's an old T43!  What about Ruby itself - can you start up irb quickly for example?  If your computer can startup eclipse quickly then rails should not be a problem.

>irb

2secs later the irb(main):001:0>, works well.

i have finded out method require_frameworks() takes  most of times. but i don't know why and how to next step.

Re: rails startup too slow

thanks a lot.

i checked it again with my environment variable RUBYOPT
RUBYOPT=rubygems   shouldbe  RUBYOPT=-rubygems

and now :
>ruby script\server only takes 30 secs.

very good.

then i try mongrel
>gem install mongrel

show something :
** Ruby version is up-to-date; cgi_multipart_eof_fix was not loaded

why?

Re: rails startup too slow

I realize the post is quite old but I am confronting with the same problem right now. I suspect that there is a virus making my system running so slow since I didn't use any anti-virus for the last couple of weeks. Hopefully things will be solved once I get the content security software.

Re: rails startup too slow

Hello Friend

After reading your post i really feel that this is not your computer problem friends problem is in your server the data fetching is from the database is very slow this is only thing for which you need to worry about and your computer  oooh its compactly fine....
And friend tell me what operating system you are using because if you are using windows 7 then Almost all new operating provide some wonder full features for the this propose like windows 7 memory optimization is one of them in this feature windows 7 automatically check about the memory uses and free memory and do garbage collection for all the necessary area by doing this it save the memory over flow and maintenance the speed of windows ..

Last edited by adamstuart07 (2012-03-14 05:47:57)

Re: rails startup too slow

Hello Friend,

I read your problem in this topic and i think it is not only your computer problem. It may be Your computer server and may be you data fetching problem.I've also faced this type of problem my friend tells me about  Remote Support.