Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thoughtbot/capybara-webkit
...
head fork: morganchristiansson/capybara-webkit
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 22, 2011
@morganchristiansson morganchristiansson Lazy load classes using autoload, leads to 0.2 second speedup in load…
…ing the library on my laptop.

$ git checkout master ; for x in $(seq 1 5) ; do time ruby bm.rb ; done

real	0m0.543s
user	0m0.470s
sys	0m0.060s

real	0m0.567s
user	0m0.490s
sys	0m0.050s

real	0m0.551s
user	0m0.460s
sys	0m0.060s

real	0m0.546s
user	0m0.510s
sys	0m0.010s

real	0m0.535s
user	0m0.480s
sys	0m0.050s

$ git checkout master^ ; for x in $(seq 1 5) ; do time ruby bm.rb ; done

real	0m0.712s
user	0m0.580s
sys	0m0.110s

real	0m0.715s
user	0m0.620s
sys	0m0.070s

real	0m0.712s
user	0m0.570s
sys	0m0.120s

real	0m0.711s
user	0m0.550s
sys	0m0.140s

real	0m0.715s
user	0m0.590s
sys	0m0.110s
8fcb4d4
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/capybara/driver/webkit.rb
View
9 lib/capybara/driver/webkit.rb
@@ -1,10 +1,11 @@
require "capybara"
-require "capybara/driver/webkit/node"
-require "capybara/driver/webkit/browser"
-require "capybara/driver/webkit/socket_debugger"
-require "capybara/driver/webkit/cookie_jar"
class Capybara::Driver::Webkit
+ autoload :Node, "capybara/driver/webkit/node"
+ autoload :Browser, "capybara/driver/webkit/browser"
+ autoload :SocketDebugger, "capybara/driver/webkit/socket_debugger"
+ autoload :CookieJar, "capybara/driver/webkit/cookie_jar"
+
class WebkitInvalidResponseError < StandardError
end

No commit comments for this range

Something went wrong with that request. Please try again.