[rspec-users] Mocks? Really?

Brian Takita brian.takita at gmail.com
Mon Dec 17 19:59:20 EST 2007


On Dec 17, 2007 2:08 PM, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>
> On Dec 17, 2007, at 4:42 PM, Brian Takita wrote:
>
> > On Dec 17, 2007 1:29 PM, Scott Taylor
> > <mailing_lists at railsnewbie.com> wrote:
> >>
> >>
> >>> True. I also did some custom fixture optimizations. For some reason,
> >>> instantiating a Fixture object instance is very slow. I've rigged it
> >>> so there is only one instance of a Fixture object for each table for
> >>> the entire process.
> >>> Of course this would break fixture scenarios.
> >>>
> >>> I've had around 20-30% increases using in memory sqllite, about 1
> >>> year
> >>> ago. I havn't tried it since.
> >>
> >> Interesting.  I'm not using Fixtures, so I guess this isn't an option
> >> for me. (I need to figure out a way to speed up FixtureReplacement).
> >>
> >> What was so slow in the fixture instantiation?
> > I didn't isolate what about fixture instantiation was slow. It reads
> > the yaml files and converts the hash into objects.
> > All I know is when I did the optimization, I got around a 30%
> > performance increase when loading all fixtures in all Examples.
>
> I assume you were using instantiated fixtures, and not transactional
> fixtures?
I was using transactional fixtures.
This was before Rails 2.0 fixture optimizations, so I'm not sure if
the same applies today.
>
>
> Scott
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list