Read more

Fix: Capybara is very slow when filling out fields in large forms

Henning Koch
June 14, 2012Software engineer at makandra GmbH

We haven't tested if this very old issue still exists.

In large forms (30+ controls) new Capybara version become [extremely slow] when filling out fields. It takes several seconds per input. The reason for this is that Capybara generates a huge slow XPath expression Show archive.org snapshot to find the field.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

The attached code patches fill_in with a much faster implementation. It's a dirty fix and probably does a lot less than Capybara's own fill_in so don't use it unless you are having problems with test suites that are unusable because of this problem.

To use the patch in Cucumber, copy it to features/support.

Posted by Henning Koch to makandra dev (2012-06-14 15:02)