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

From: Simon Flack (sf at flacks.net)
Date: Sun Nov 28 2004 - 13:41:31 GMT


On Sat, 27 Nov 2004 20:41:45 -0500, Brian Glass wrote
> Dave Howorth wrote:
>
> >> I only use AsForm for non-relationship fields. It turned out that the
> >> real performance problems were created by object creation, not large
> >> queries or MySQL. This little tweak makes my Maypole application
> >> very fast.
> >
> >
> > Hi Brian,
> >
> > Your function looks very interesting to me. I'd love to see your
> > template.
> >
> > Cheers, Dave
> >
> > _______________________________________________
> > maypole mailing list
> > maypole at lists.netthink.co.uk
> > http://lists.netthink.co.uk/listinfo/maypole
> >
> Minimally, you pass an object or class and the field name ala:
>
> <& macros/to_field, object => $family, field => 'persons' &>
>
> There are other arguments as well. Assuming the $family object
> has_many persons this will produce a select list of persons. It
> should work for just about any relationship. Note also that you can
> overide the simple_list method in your subclasses if you need to do
> something fancier.
>
> If people are interested or have ideas for improvements or better
> ways to do this I can flesh it out a little better. I would think
> this sort of thing would come in handy in the factory templates.

Forgive me if I'm barking up the wrong tree here, but isn't this a
Class::DBI::AsForm issue? I seem to remember suggestions that setting the
Essentials columns appropriately in your CDBI classes would give significant
performance improvements. Have you tried that, and if so, did it help?

I was also under the impression that the default templates were just examples:
    http://lists.netthink.co.uk/pipermail/maypole/2004-November/000975.html

I'd like to see them stay that way and not over-complicate them. If there is a
demand for drop-in templates, I suggest creating Maypole separate "theme packs".

--simonflk

_______________________________________________
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