[Dbix-class] Caching DBIx-Class Fixtures

Ovid publiustemp-dbic at yahoo.com
Wed Jun 18 14:18:11 BST 2008


--- Drew Taylor <taylor.andrew.j at gmail.com> wrote:

> In my case (I'm running Postgres), I ended up with several thousand
> individual fixture files which took an enormous amount of time to
> process because of all the extra IO. Enough that it made running
> tests prohibitive.

Ah.  I was expecting as much.

> I'm importing my pg_dump file rather than then 3k+ individual
> fixtures files.
> 
> Luke and I have discussed briefly how we can encapsulate this
> behavior, but we haven't gone further than that. Patches & ideas
> welcome! :-)

This is conceptually similar to what I need to do, but as mentioned
previously, I want that DDL to only be the data I'm loading for the
fixtures, not the entire database + static data (which already exists
by the time I need to load the fixtures.  Again, see the following for
more information:

 
http://www.oreillynet.com/onlamp/blog/2007/12/improving_test_performance.html

So I guess this all goes back to my original question:  when I'm
running DBIx::Class, is there any way I can trap the SQL and bind
parameters used so I can potentially cache them?

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/



More information about the DBIx-Class mailing list