[Dbix-class] DBIx::Class::Fixtures speedup
Drew Taylor
taylor.andrew.j at gmail.com
Wed Apr 23 13:03:22 BST 2008
On Wed, Apr 23, 2008 at 12:43 PM, luke saunders
<luke at shadowcatsystems.co.uk> wrote:
> On Wed, Apr 23, 2008 at 12:14 PM, Drew Taylor <taylor.andrew.j at gmail.com> wrote:
>
> > I'm using Fixtures in my app, and am overall pleased with it. But I
> > now have a couple thousand fixture items which are imported, and
> > that's taking upwards of 1min+. Out of curiosity I commented out the
> > creation of the tmp_fixtures_dir and just read from fixtures_dir. I
> > shaved my populate() time in approximately half. What's the reasoning
> > for the tmp dir? Safety in case anything goes wrong? For me, it's just
> > a lot of wasted IOs and time. :-) Luke, any objections if I remove
> > this?
> >
>
> The tmp directory is used so that if someone dumps while you are
> populating the populate is unaffected. Since this is an issue for some
> people I'd suggest making the tmp directory thing configurable,
> probably in the call to ->new. Normally if the fixtures are on a local
> drive using a tmp directory doesn't take too long so I'd prefer to
> keep it the default.
Ahhh, that makes sense. The copy doesn't take _that_ long (I'm
guessing around 30-60 seconds for my current record set), but when I
want to do quick, successive test runs it adds up rather quickly.
> Or better still you can commit it yourself. Do you have a commit bit?
Yes I do.
Drew
--
----------------------------------------------------------------
Drew Taylor * Web development & consulting
Email: drew at drewtaylor.com * Site implementation & hosting
Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres
----------------------------------------------------------------
More information about the DBIx-Class
mailing list