The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Speeding Up Net::HTTP, OpenURI or Any Other TCPSocket Offspring

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Speeding Up Net::HTTP, OpenURI or Any Other TCPSocket Offspring Posted: Apr 25, 2006 9:37 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Speeding Up Net::HTTP, OpenURI or Any Other TCPSocket Offspring
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Only if you’re doing lots of requests amongst threads and you notice that the opening of the socket is blocking everything.

 require 'resolv-replace'

And if you are, then it’s the Matz’ pajamas.

From his own tongue:

I’m sorry if you feel offended, it’s not my intention. But if getaddrinfo() on your system does not work as you expect, I’m not the right person to report. The only workaround I can think of is to use “resolv-replace”, which is pure Ruby resolver. It is not fast at all, but at least other thread can work during resolving.

For an example, see Josh Harvey’s code.

Read: Speeding Up Net::HTTP, OpenURI or Any Other TCPSocket Offspring

Topic: You Are Born With No Body Parts... Previous Topic   Next Topic Topic: ActiveRecord Calculations

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use