[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rails with webrick slow as snails

Sarah Tanembaum

12/1/2004 6:27:00 PM

I've followed the sample installation
http://www.leetsoft.com/rails/le... step by step and it works, I
think. I got the same message as the example

BUT

1. when starting the webrick from the command line, IT'S SLOW AS SNAIL
2. when pointing to the http://localhost:3000/hello/index, IT SLOW AS
SNAIL AS WELL. It takes at least 4 minutes to get the result.

What am I doing wrong?


Below are the error on the console:

#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
127.0.0.1 - - [01/Dec/2004:13:20:29 Eastern Standard Time] "GET
/hello/index HTTP/1.1" 200 306
- -> /hello/index
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 13:25:19] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:13:25:19 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico
#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
14 Answers

David Heinemeier Hansson

12/1/2004 6:42:00 PM

0

> BUT
>
> 1. when starting the webrick from the command line, IT'S SLOW AS SNAIL
> 2. when pointing to the http://localhost:3000/hello/index, IT SLOW AS
> SNAIL AS WELL. It takes at least 4 minutes to get the result.
>
> What am I doing wrong?

What kind of hardware are you running on? 4 minutes sound insane in any
case, though.

The reloading WEBrick dispatcher is indeed dog slow in 0.8.5 (around ~1
second per reload on my G4 1.5ghz). This is being greatly remedied in
the forthcoming 0.9.0 that's already available as beta gems right now.

The new approach uses a two-tiered approach to requiring classes where
your app is reloaded on every request, but the framework remains cached
and the interpreter is reused. This is much, much more efficient and
hence much faster.

One guy reported going from 10s per page load to much less than a
second on his G3 400mhz Mac.

So if you don't find out what's screwing up your current installation,
you might want to try out the beta gems. They can be fetched with:

gem update -s http://gems.rubyo...

For convenience, there's even an executable start_server command in the
root of new apps created with 0.9. Click that and the WEBrick server
starts.
--
David Heinemeier Hansson,
http://www.basec... -- Web-based Project Management
http://www.rubyon... -- Web-application framework for Ruby
http://macro... -- TextMate: Code and markup editor (OS X)
http://www.loudthi... -- Broadcasting Brain



Sarah Tanembaum

12/1/2004 8:12:00 PM

0

David Heinemeier Hansson wrote:
>> BUT
>>
>> 1. when starting the webrick from the command line, IT'S SLOW AS SNAIL
>> 2. when pointing to the http://localhost:3000/hello/index, IT SLOW AS
>> SNAIL AS WELL. It takes at least 4 minutes to get the result.
>>
>> What am I doing wrong?
>
>
> What kind of hardware are you running on? 4 minutes sound insane in any
> case, though.
>
> The reloading WEBrick dispatcher is indeed dog slow in 0.8.5 (around ~1
> second per reload on my G4 1.5ghz). This is being greatly remedied in
> the forthcoming 0.9.0 that's already available as beta gems right now.
>
> The new approach uses a two-tiered approach to requiring classes where
> your app is reloaded on every request, but the framework remains cached
> and the interpreter is reused. This is much, much more efficient and
> hence much faster.
>
> One guy reported going from 10s per page load to much less than a second
> on his G3 400mhz Mac.
>
> So if you don't find out what's screwing up your current installation,
> you might want to try out the beta gems. They can be fetched with:
>
> gem update -s http://gems.rubyo...
>
> For convenience, there's even an executable start_server command in the
> root of new apps created with 0.9. Click that and the WEBrick server
> starts.
> --
> David Heinemeier Hansson,
> http://www.basec... -- Web-based Project Management
> http://www.rubyon... -- Web-application framework for Ruby
> http://macro... -- TextMate: Code and markup editor (OS X)
> http://www.loudthi... -- Broadcasting Brain
>
>
>

Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit,
but not much. It takes at least 3 minutes for the sample page to come up
and it will take just as long to reload/refresh the same page. Plus,
starting up the "ruby dispatch.servlet -a" takes at least 1 minutes.

I will try what you suggested by updating it to the latest beta.

Thanks

David Heinemeier Hansson

12/1/2004 8:26:00 PM

0

> Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a
> bit, but not much. It takes at least 3 minutes for the sample page to
> come up and it will take just as long to reload/refresh the same page.
> Plus, starting up the "ruby dispatch.servlet -a" takes at least 1
> minutes.
>
> I will try what you suggested by updating it to the latest beta.

Something is obviously broken in your setup. Your machine should be
fully capable of reloading that screen in MAX 5 seconds, I'd say. And
I'd think it should be more like 2-3. I wonder if something is trying
to resolve something and waiting for a timeout. Could sound like it.

If that's the case, maybe it won't even help to upgrade to the beta
rails. You should probably try do to a simple test with webrick and see
if you can get that to perform if possible.
--
David Heinemeier Hansson,
http://www.basec... -- Web-based Project Management
http://www.rubyon... -- Web-application framework for Ruby
http://macro... -- TextMate: Code and markup editor (OS X)
http://www.loudthi... -- Broadcasting Brain



Lothar Scholz

12/1/2004 8:51:00 PM

0

Hello Sarah,

ST> Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit,
ST> but not much. It takes at least 3 minutes for the sample page to come up
ST> and it will take just as long to reload/refresh the same page. Plus,
ST> starting up the "ruby dispatch.servlet -a" takes at least 1 minutes.

ST> I will try what you suggested by updating it to the latest beta.

Do you have the Windows SP2 firewall enabled ? I also got a 20 sec
delay for the first connect on my 2,8Ghz PIV machine (VMWare sandbox)
before i turned the firewall off.

3 minutes is a clear sign that the problem is your envrionment and not
inside ruby/rails.

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




Sarah Tanembaum

12/1/2004 9:27:00 PM

0

Lothar Scholz wrote:
> Hello Sarah,
>
> ST> Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit,
> ST> but not much. It takes at least 3 minutes for the sample page to come up
> ST> and it will take just as long to reload/refresh the same page. Plus,
> ST> starting up the "ruby dispatch.servlet -a" takes at least 1 minutes.
>
> ST> I will try what you suggested by updating it to the latest beta.
>
> Do you have the Windows SP2 firewall enabled ? I also got a 20 sec
> delay for the first connect on my 2,8Ghz PIV machine (VMWare sandbox)
> before i turned the firewall off.
>
> 3 minutes is a clear sign that the problem is your envrionment and not
> inside ruby/rails.
>

Dear David & Lothar, I did try using the Webrick's Hello servlet sample
script and the response is much faster, both the startup and http
access. Any idea?

Thanks

Sarah Tanembaum

12/1/2004 10:32:00 PM

0

Lothar Scholz wrote:
> Hello Sarah,
>
> ST> Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit,
> ST> but not much. It takes at least 3 minutes for the sample page to come up
> ST> and it will take just as long to reload/refresh the same page. Plus,
> ST> starting up the "ruby dispatch.servlet -a" takes at least 1 minutes.
>
> ST> I will try what you suggested by updating it to the latest beta.
>
> Do you have the Windows SP2 firewall enabled ? I also got a 20 sec
> delay for the first connect on my 2,8Ghz PIV machine (VMWare sandbox)
> before i turned the firewall off.
>
> 3 minutes is a clear sign that the problem is your envrionment and not
> inside ruby/rails.
>

Below are the log from the console of '%> ruby dispatch.servlet -a'

C:\rails\public>ruby dispatch.servlet -a
dispatch: invalid option: -a
[2004-12-01 17:18:46] INFO WEBrick 1.3.1
[2004-12-01 17:18:46] INFO ruby 1.8.2 (2004-11-06) [i386-mswin32]
[2004-12-01 17:18:46] INFO WEBrick::HTTPServer#start: pid=2620 port=3000
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 17:21:18] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:17:21:18 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico
#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
X:/websites/rails/public/../config/environments/shared.rb:1: warning:
already initialized constant ADDITIONAL_LOAD_PATHS
#<NameError: undefined method `database_configurations' for class
`Builder::BlankSlate'>
["x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blankslate.rb:20:in
`un
ef_method'",
"x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blankslate.
b:20:in `hide'",
"x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blanksl
te.rb:48:in `method_added'",
"X:/websites/rails/public/../config/environments/shared.rb:15",
"x:/apps/ruby/ruby-1.8/lib/ruby/site_r
by/1.8/rubygems/loadpath_manager.rb:5:in `require__'",
"x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5
in `require'",
"X:/websites/rails/public/../config/environments/production.rb:1",
"x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rub
gems/loadpath_manager.rb:5:in `require__'",
"x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`requir
'", "X:/websites/rails/public/dispatch.rb:3",
"x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_se
ver.rb:122:in `load'",
"x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:122:in
`handle_
ispatch'",
"x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:101:in
`handle_mapped'", "x
/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:53:in
`do_GET'", "x:/apps/ruby/ruby-1.8/l
b/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/httpservlet/abstract.rb:3
:in `service'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/httpserver.rb:97:in
`service'", "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/web
ick/httpserver.rb:58:in `run'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:153:in
`start_thread'", "x:/apps/ruby/ruby-1.
/lib/ruby/1.8/webrick/server.rb:147:in `start'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:147:in
`start_thread'", "x:/
pps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:97:in `start'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:89:in `each'
, "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:89:in `start'",
"x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:79:in
`start'", "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:79:in
`start'", "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails
0.8.5.200412010045/lib/webrick_server.rb:37:in `dispatch'",
"dispatch.servlet:45"]
[2004-12-01 17:21:40] ERROR `/hello/index' not found.
127.0.0.1 - - [01/Dec/2004:17:21:30 Eastern Standard Time] "GET
/hello/index HTTP/1.1" 404 281
- -> /hello/index
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 17:21:41] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:17:21:40 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico
#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
127.0.0.1 - - [01/Dec/2004:17:22:42 Eastern Standard Time] "GET
/hello/index HTTP/1.1" 200 306
- -> /hello/index
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 17:22:48] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:17:22:48 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico
#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
127.0.0.1 - - [01/Dec/2004:17:23:05 Eastern Standard Time] "GET
/hello/index HTTP/1.1" 200 306
- -> /hello/index
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 17:23:07] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:17:23:07 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico
#<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
127.0.0.1 - - [01/Dec/2004:17:23:25 Eastern Standard Time] "GET
/hello/index HTTP/1.1" 200 306
- -> /hello/index
#<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
[2004-12-01 17:23:31] ERROR `/favicon.ico' not found.
127.0.0.1 - - [01/Dec/2004:17:23:31 Eastern Standard Time] "GET
/favicon.ico HTTP/1.1" 404 281
- -> /favicon.ico

Tobias Luetke

12/1/2004 11:17:00 PM

0

under windows it seems to be very important to use rubyw.exe and not
ruby.exe for performance. Maybe thats it ?


On Thu, 2 Dec 2004 07:32:45 +0900, Sarah Tanembaum
<sarahtanembaum@yahoo.com> wrote:
> Lothar Scholz wrote:
>
>
> > Hello Sarah,
> >
> > ST> Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit,
> > ST> but not much. It takes at least 3 minutes for the sample page to come up
> > ST> and it will take just as long to reload/refresh the same page. Plus,
> > ST> starting up the "ruby dispatch.servlet -a" takes at least 1 minutes.
> >
> > ST> I will try what you suggested by updating it to the latest beta.
> >
> > Do you have the Windows SP2 firewall enabled ? I also got a 20 sec
> > delay for the first connect on my 2,8Ghz PIV machine (VMWare sandbox)
> > before i turned the firewall off.
> >
> > 3 minutes is a clear sign that the problem is your envrionment and not
> > inside ruby/rails.
> >
>
> Below are the log from the console of '%> ruby dispatch.servlet -a'
>
> C:\rails\public>ruby dispatch.servlet -a
> dispatch: invalid option: -a
> [2004-12-01 17:18:46] INFO WEBrick 1.3.1
> [2004-12-01 17:18:46] INFO ruby 1.8.2 (2004-11-06) [i386-mswin32]
> [2004-12-01 17:18:46] INFO WEBrick::HTTPServer#start: pid=2620 port=3000
> #<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
> [2004-12-01 17:21:18] ERROR `/favicon.ico' not found.
> 127.0.0.1 - - [01/Dec/2004:17:21:18 Eastern Standard Time] "GET
> /favicon.ico HTTP/1.1" 404 281
> - -> /favicon.ico
> #<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
> X:/websites/rails/public/../config/environments/shared.rb:1: warning:
> already initialized constant ADDITIONAL_LOAD_PATHS
> #<NameError: undefined method `database_configurations' for class
> `Builder::BlankSlate'>
> ["x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blankslate.rb:20:in
> `un
> ef_method'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blankslate.
> b:20:in `hide'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_view/vendor/builder/blanksl
> te.rb:48:in `method_added'",
> "X:/websites/rails/public/../config/environments/shared.rb:15",
> "x:/apps/ruby/ruby-1.8/lib/ruby/site_r
> by/1.8/rubygems/loadpath_manager.rb:5:in `require__'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5
> in `require'",
> "X:/websites/rails/public/../config/environments/production.rb:1",
> "x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rub
> gems/loadpath_manager.rb:5:in `require__'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
> `requir
> '", "X:/websites/rails/public/dispatch.rb:3",
> "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_se
> ver.rb:122:in `load'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:122:in
> `handle_
> ispatch'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:101:in
> `handle_mapped'", "x
> /apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/webrick_server.rb:53:in
> `do_GET'", "x:/apps/ruby/ruby-1.8/l
> b/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/httpservlet/abstract.rb:3
> :in `service'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/httpserver.rb:97:in
> `service'", "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/web
> ick/httpserver.rb:58:in `run'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:153:in
> `start_thread'", "x:/apps/ruby/ruby-1.
> /lib/ruby/1.8/webrick/server.rb:147:in `start'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:147:in
> `start_thread'", "x:/
> pps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:97:in `start'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:89:in `each'
> , "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:89:in `start'",
> "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:79:in
> `start'", "x:/apps/ruby/ruby-1.8/lib/ruby/1.8/webrick/server.rb:79:in
> `start'", "x:/apps/ruby/ruby-1.8/lib/ruby/gems/1.8/gems/rails
> 0.8.5.200412010045/lib/webrick_server.rb:37:in `dispatch'",
> "dispatch.servlet:45"]
> [2004-12-01 17:21:40] ERROR `/hello/index' not found.
> 127.0.0.1 - - [01/Dec/2004:17:21:30 Eastern Standard Time] "GET
> /hello/index HTTP/1.1" 404 281
> - -> /hello/index
> #<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
> [2004-12-01 17:21:41] ERROR `/favicon.ico' not found.
> 127.0.0.1 - - [01/Dec/2004:17:21:40 Eastern Standard Time] "GET
> /favicon.ico HTTP/1.1" 404 281
> - -> /favicon.ico
> #<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
> 127.0.0.1 - - [01/Dec/2004:17:22:42 Eastern Standard Time] "GET
> /hello/index HTTP/1.1" 200 306
> - -> /hello/index
> #<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
> [2004-12-01 17:22:48] ERROR `/favicon.ico' not found.
> 127.0.0.1 - - [01/Dec/2004:17:22:48 Eastern Standard Time] "GET
> /favicon.ico HTTP/1.1" 404 281
> - -> /favicon.ico
> #<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
> 127.0.0.1 - - [01/Dec/2004:17:23:05 Eastern Standard Time] "GET
> /hello/index HTTP/1.1" 200 306
> - -> /hello/index
> #<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
> [2004-12-01 17:23:07] ERROR `/favicon.ico' not found.
> 127.0.0.1 - - [01/Dec/2004:17:23:07 Eastern Standard Time] "GET
> /favicon.ico HTTP/1.1" 404 281
> - -> /favicon.ico
> #<WEBrick::HTTPStatus::NotFound: `/hello/index' not found.>
> 127.0.0.1 - - [01/Dec/2004:17:23:25 Eastern Standard Time] "GET
> /hello/index HTTP/1.1" 200 306
> - -> /hello/index
> #<WEBrick::HTTPStatus::NotFound: `/favicon.ico' not found.>
> [2004-12-01 17:23:31] ERROR `/favicon.ico' not found.
> 127.0.0.1 - - [01/Dec/2004:17:23:31 Eastern Standard Time] "GET
>
>
> /favicon.ico HTTP/1.1" 404 281
> - -> /favicon.ico
>
>


--
Tobi
http://blog.le...


Carl Youngblood

12/1/2004 11:21:00 PM

0

Tobias Luetke wrote:

>under windows it seems to be very important to use rubyw.exe and not
>ruby.exe for performance. Maybe thats it ?
>
Question: I've seen this mentioned a few times now. If this is the
case, does the ruby installer for Windows associate .rb files with
ruby.exe or rubyw.exe? It would seem silly to be saying it should be
one way and then have all the default behaviors do it the other way. If
there is no good use for ruby.exe, then we should simply rename
rubyw.exe to ruby.exe.


Lothar Scholz

12/1/2004 11:29:00 PM

0

Hello Carl,

CY> Tobias Luetke wrote:

>>under windows it seems to be very important to use rubyw.exe and not
>>ruby.exe for performance. Maybe thats it ?
>>
CY> Question: I've seen this mentioned a few times now. If this is the
CY> case, does the ruby installer for Windows associate .rb files with
CY> ruby.exe or rubyw.exe? It would seem silly to be saying it should be
CY> one way and then have all the default behaviors do it the other way. If
CY> there is no good use for ruby.exe, then we should simply rename
CY> rubyw.exe to ruby.exe.

rubyw.exe is faster if you don't need standart output, because everything
is going to /dev/null.

I believe that most programs are still command line programs that
write something useful to standart output. So ther current
associations are correct.


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




Henrik Horneber

12/1/2004 11:36:00 PM

0

Lothar Scholz wrote:

> Hello Carl,
>
> CY> Tobias Luetke wrote:
>
>
>>>under windows it seems to be very important to use rubyw.exe and not
>>>ruby.exe for performance. Maybe thats it ?
>>>
>
> CY> Question: I've seen this mentioned a few times now. If this is the
> CY> case, does the ruby installer for Windows associate .rb files with
> CY> ruby.exe or rubyw.exe? It would seem silly to be saying it should be
> CY> one way and then have all the default behaviors do it the other way. If
> CY> there is no good use for ruby.exe, then we should simply rename
> CY> rubyw.exe to ruby.exe.
>
> rubyw.exe is faster if you don't need standart output, because everything
> is going to /dev/null.
>
> I believe that most programs are still command line programs that
> write something useful to standart output. So ther current
> associations are correct.
>
>

I agree with Lothar.

method_scope is just a simple test script that prints stuff to stdout.
first with original ruby

H:\ruby\Spielwiese>method_scope.rb
bar
A.moo
instance moo

now I renamed rubyw to ruby
H:\ruby\Spielwiese>method_scope.rb


H:\ruby\Spielwiese>


I'd like to see the output. :)

regards,
Henrik