[Dbix-class] DBIx::Class and caching

Oleg Pronin syber.rus at gmail.com
Thu Jul 3 12:57:11 BST 2008


DBIx::Class::Cursor::Cached is too slow for production use. It caches only
data from DB making it impossible so store virtual data in objects and after
fetching data from cache it has to construct a row object which is a
expensive action for CPU, running all the 'inflate_result', and possibly
other hard tasks.

When you use DBIC::C::C - it slows down the request by 2 times (based on
local CPU usage - not DB).

With solution i posted, request is 3-4x faster than original for local CPU.

2008/7/3 Andreas Pronakis <andr3as at yahoo.com>:

> I was wondering if anyone has tried using the module
> DBIx::Class::Cursor::Cached but replacing the cache engine Cache::FileCac=
he
> with Memcache?
>
> I will try it out and let you know the results, but if someone else has
> already tried it would be nice to know what their findings were
>
> Andreas
>
>
> --- On Wed, 6/25/08, Oleg Pronin <syber.rus at gmail.com> wrote:
>
> > From: Oleg Pronin <syber.rus at gmail.com>
> > Subject: Re: [Dbix-class] DBIx::Class and caching
> > To: andr3as at yahoo.com, "DBIx::Class user and developer list" <
> dbix-class at lists.scsys.co.uk>
> > Date: Wednesday, June 25, 2008, 9:23 AM
> > These approach caches ready objects, not just a data from
> > database, so it
> > quite fast, and lets you to cache any data with object,
> > even not from DB.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080703/c28=
4bbfe/attachment.htm


More information about the DBIx-Class mailing list