Re: [Maypole] Re: Maypole responding to requests very slowly (or, how to get just one associated record instead of getting the world)

From: Dave Howorth (Dave.Howorth at acm.org)
Date: Thu Dec 02 2004 - 01:27:13 GMT


>> And something still needs to be done about the
>> $classmetadata->{cgi} auto-creation. I have it commented out in my
>> version of Maypole::View::Base. If you have any significant ammount
>> of real data it causes extreme slowness.
>
> Agreed, but it depends on your data. I think the problem is that
> CDBI::AsForm->to_cgi (which is what populates classmetadata.cgi)
> creates the HTML for all the columns (disregarding Essentials). I
> suppose that's a pretty sensible default since it makes it very easy
> to get started with Maypole. You just need an easy way of tuning
> it/turning it off without resorting to sublassing the model. After
> all, in M::V::TT at least, you can still do this:
>
> [% object.to_field('column', 'select').as_HTML %]

I was confused for a minute here, until I realized there are two
separate topics under discussion.

The first one is the classmetadata and I think you're both agreed that
it would be nice to have a means to turn it off. Somehow making it
evaluate lazily would be another option. Ironic perhaps, but turning it
into an object is my first thought :)

But the second topic is Brian's original problem, of the slow select
generation, and it's the to_field method (or rather its _to_select
helper) that causes his problem. So I don't think that calling it by
hand in the template is a solution! It seems to me that it would be good
for Brian's code to live inside _to_select.

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT