Hi Alan,

Was the select class defined before you loaded the object from cache?

Cheers,
Steven

-----Original Message-----
From: Alan Wagstaff [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 27 February 2008 8:33 AM
To: Zend Framework - General
Subject: [fw-general] Zend_Form_Element_Select speed / caching questions

Hi all,

I'm using a Select element in one of my forms that displays a list of
timezones for the user to choose from.  The timezone list itself is
stored in an array that currently contains 437 items.  I then add the
timezone array using the addMultiOptions() message.

Unfortunately, this causes noticable slowness when loading the page.
I added some timing code and the page load went from 0.8 seconds to
1.6 seconds.  Removing the timezone Select element dropped the page
load time to normal levels (ie, 0.02, 0.03, etc).

I had a play about with Zend_Cache to see if I could cache just the
Select element (the rest of the page is very dynamic else I'd just
cache the whole page) but didn't have much sucess.  Zend_Cache_Core
didn't seem to serialize the Select object correctly so I ended up
with an error in the View about an incomplete object.

I also tried Zend_Cache_Class but whilst that just didn't display the
Select element (no errors).

So at this point, I'm out of ideas.

Anyone got any ideas to help speed up my form without manually coding
the HTML for the timezone Select element into my View? :)

Thanks,
Al.


Reply via email to