Fix for Issue #41 - Slowness on Linux #358

wants to merge 4 commits into


None yet

4 participants

benizi commented Jul 16, 2012

Changes just set the TCP_NODELAY flag on TCP sockets when running on a system that has that flag.

Fixes issue #41 for me.

benizi added some commits Jul 16, 2012
@benizi benizi Set TCP_NODELAY option on the TCPSocket 44489f9
@benizi benizi Guard TCP_NODELAY with kind_of? and defined? tests
I don't have a test system that doesn't have TCP_NODELAY defined, but
presumably these conditions are enough to confine its use to systems on
which it makes sense.
jferris commented Jul 19, 2012

Thanks for the patch. I'd like to get this pulled in, but we need to get it tested first. Even a straight stub/spy/mock would suffice. Otherwise, I'm pretty likely to break this while refactoring.


Is there any news?

benizi commented Jul 24, 2012

First commit is just a minor style update. Second is an in-progress test for this. It fails in RSpec 2.6.0 (some issue with rspec-mocks) -- passes if I remove the '~> 2.6.0' condition in the gemspec. Someone more familiar w/ RSpec mocks could probably fix my test, but I'm also not positive I'm testing what needs to be tested (@jferris ?).


This branch works great for me, 197 scenarios with 2556 steps (not all tests running in capybara-webkit) ran in 1/3 the time. All my tests still pass (I was using commit e677cb9 previously)

jferris commented Aug 10, 2012

Thanks. I had to make some modifications to get the tests passing for me, but this is merged now.

@jferris jferris closed this Aug 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment