Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-27 Thread Toby Corkindale
See attached for a patch that simply emulates that Mason-cache behaviour. (Note that this does not fix the race conditions I identified in my most-recent email to the list.) -Toby Perrin Harkins wrote: On Thu, 2006-06-22 at 14:01 -0500, [EMAIL PROTECTED] wrote: Or have the first hit after t

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-25 Thread Marcello Romani
[EMAIL PROTECTED] ha scritto: > > > > > > [EMAIL PROTECTED] wrote on 06/23/2006 11:04:07 AM: > >> [EMAIL PROTECTED] ha scritto: >>> >>> >>> [EMAIL PROTECTED] ha scritto: > > >> Perrin Harkins wrote: >>> Toby Corkindale wrote: One of the aims of my patch is to avo

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Wade . Stuart
[EMAIL PROTECTED] wrote on 06/23/2006 11:04:07 AM: > [EMAIL PROTECTED] ha scritto: > > > > > > > > > >> [EMAIL PROTECTED] ha scritto: > >>> > >>> > >>> > Perrin Harkins wrote: > > Toby Corkindale wrote: > >> One of the aims of my patch is to avoid the expense of having > > numer

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Marcello Romani
[EMAIL PROTECTED] ha scritto: > > > > >> [EMAIL PROTECTED] ha scritto: >>> >>> >>> Perrin Harkins wrote: > Toby Corkindale wrote: >> One of the aims of my patch is to avoid the expense of having > numerous >> processes produce the same code simultaneously. So on the initial >>>

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Wade . Stuart
> [EMAIL PROTECTED] ha scritto: > > > > > > > > > >> Perrin Harkins wrote: > >>> Toby Corkindale wrote: > One of the aims of my patch is to avoid the expense of having numerous > > > processes produce the same code simultaneously. So on the initial > > bunch > of requests, I'll

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Marcello Romani
[EMAIL PROTECTED] ha scritto: > > > > >> Perrin Harkins wrote: >>> Toby Corkindale wrote: One of the aims of my patch is to avoid the expense of having numerous > processes produce the same code simultaneously. So on the initial > bunch of requests, I'll still try and have the c

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Wade . Stuart
> Perrin Harkins wrote: > > Toby Corkindale wrote: > >> One of the aims of my patch is to avoid the expense of having numerous > >> processes produce the same code simultaneously. So on the initial bunch > >> of requests, I'll still try and have the code delay all-but-one of them > >> from bu

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Toby Corkindale
Perrin Harkins wrote: > Toby Corkindale wrote: >> One of the aims of my patch is to avoid the expense of having numerous >> processes produce the same code simultaneously. So on the initial bunch >> of requests, I'll still try and have the code delay all-but-one of them >> from building the page

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Perrin Harkins
Toby Corkindale wrote: > One of the aims of my patch is to avoid the expense of having numerous > processes produce the same code simultaneously. So on the initial bunch > of requests, I'll still try and have the code delay all-but-one of them > from building the page. Presumably this only happ

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Toby Corkindale
Perrin Harkins wrote: > Toby Corkindale wrote: >> Perrin Harkins wrote: >>> FYI, that's how Mason does it. >> What is the behaviour for the first and second requests, before there is >> *any* cached content available? > > In Mason? The same as any other request for un-cached content. You can >

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Perrin Harkins
Toby Corkindale wrote: > Perrin Harkins wrote: >> FYI, that's how Mason does it. > > What is the behaviour for the first and second requests, before there is > *any* cached content available? In Mason? The same as any other request for un-cached content. You can read the code and docs here: h

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Toby Corkindale
Perrin Harkins wrote: > On Thu, 2006-06-22 at 14:01 -0500, [EMAIL PROTECTED] wrote: >> Or have the first hit after the expire set the expire time counter to the >> next interval so the next hit does not even think to rebuild. Then you can >> also rebuild the cache to a temp name and overwrite the

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Toby Corkindale
Matt S Trout wrote: > Toby Corkindale wrote: >> Hi, >> There's a patch attached for Catalyst::Plugin::PageCache. >> (It's not final, but more a "request for comments" on it so far. In >> particular, some better way than using flock()) > > Why not just use pid+tid and a cache key set/get to see if

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-23 Thread Toby Corkindale
[EMAIL PROTECTED] wrote: > > > > > > > [EMAIL PROTECTED] wrote on 06/22/2006 01:37:13 PM: > >> Toby Corkindale wrote: >>> Hi, >>> There's a patch attached for Catalyst::Plugin::PageCache. >>> (It's not final, but more a "request for comments" on it so far. In >>> particular, some better way

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-22 Thread Perrin Harkins
On Thu, 2006-06-22 at 14:01 -0500, [EMAIL PROTECTED] wrote: > Or have the first hit after the expire set the expire time counter to the > next interval so the next hit does not even think to rebuild. Then you can > also rebuild the cache to a temp name and overwrite the current cache when > it is

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-22 Thread A. Pagaltzis
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2006-06-22 21:05]: > Or have the first hit after the expire set the expire time > counter to the next interval so the next hit does not even > think to rebuild. Then you can also rebuild the cache to a > temp name and overwrite the current cache when it is c

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-22 Thread Wade . Stuart
[EMAIL PROTECTED] wrote on 06/22/2006 01:37:13 PM: > Toby Corkindale wrote: > > Hi, > > There's a patch attached for Catalyst::Plugin::PageCache. > > (It's not final, but more a "request for comments" on it so far. In > > particular, some better way than using flock()) > > Why not just use

Re: [Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-22 Thread Matt S Trout
Toby Corkindale wrote: > Hi, > There's a patch attached for Catalyst::Plugin::PageCache. > (It's not final, but more a "request for comments" on it so far. In > particular, some better way than using flock()) Why not just use pid+tid and a cache key set/get to see if you're the one doing the bui

[Catalyst] C::P::PageCache patch for reducing duplicate processing

2006-06-22 Thread Toby Corkindale
Hi, There's a patch attached for Catalyst::Plugin::PageCache. (It's not final, but more a "request for comments" on it so far. In particular, some better way than using flock()) PageCache's objective is to let you cache pages that are "heavy" to create. However, the potential exists for a page