ruby-rdf / sparql-client

SPARQL client for Ruby.
http://rubygems.org/gems/sparql-client
The Unlicense
112 stars 58 forks source link

Use persistent HTTP connections #14

Closed bad closed 13 years ago

bad commented 13 years ago

the old way of using http_klass.start() with a block caused sparql-client to open and close a HTTP connection for each request. All the resulting TCP 3-way handshakes are deadly when acessing a repository in e.g. California from Germany.

Using Net::HTTP::Persistent helps a lot with that. Unfortunately it does not have an API that is a drop-in replacement with Net::HTTP, so I ended up with a one-or-the-other situation.

What do you think?

artob commented 13 years ago

Thanks, now merged. I'll review & test this more closely for the upcoming next release (0.0.10) of SPARQL::Client