From: Alex Young Date: 2006-07-17T16:05:22+09:00 Subject: Re: How to speed up ruby and make it as fast as possible Ben Johnson wrote: > I did some profiling on my code and the real bottle neck is using the > Net::HTTP library. I'm using it to grab HTML from a website. Our server > is located in Boston and after doing a digg I came to found out the > server we are communicating with is located in LA. I realize the > communication between the 2 servers is something I can not speed up, as > our server is in a very nice data center with 6 T3s. But I would still > like to speed up Ruby as much as possible. Am I wrong here? > > Lastly, I read in another thread that the Net::HTTP library was actually > slow and using something like curl is faster. Is this correct? Yes, but if you have a look through that thread, there was a specific change mentioned that you can make in the library to speed up Net::HTTP. From the top of my head (you may wish to check this), it was changing the buffer size in BufferedIO#rbuf_fill from 1024 to 8192. Why that's a constant, I don't know... -- Alex