Open joshuamcginnis opened 2 years ago
Given the factory definition in your comment, calling create(:artifact)
is equivalent to:
artifact = Artifact.new
artifact.subject = "foo_subject"
artifact.subject_address = { 'street' => Faker::Address.street_address }
artifact.save!
Do you see the same slowdown if you run that instead of create(:artifact)
?
Description
I've noticed a significant performance hit when running rspec tests whenever there is a factory that populates an
hstore
column.Reproduction Steps
Create an
hstore
column and set it like so:When an rspec test uses this factory with
subject_address
commented out, the test runs 3-6x faster. An example test to demonstrate the speed difference could be as simple as: