[nycphp-talk] lazy initialization woes
Jason Perkins
jperkins at sneer.org
Wed Nov 10 21:10:46 EST 2004
On Nov 10, 2004, at 7:50 PM, Adam Maccabee Trachtenberg wrote:
> On Wed, 10 Nov 2004, Jason Perkins wrote:
>
>> Failing this method, does anyone have any other suggestions on
>> implementing this type functionality?
>
> The first thing I would do is try is to sloppy way and just
> instantiate every object. I would then benchmark the performance and
> see if it's acceptable.
>
> Why stress out over a complicated programming solution when the easy
> one may work perfectly fine?
The notion was to use this as the basis for an ORM (ala Class::DBI or
Ruby on Rails) and in that context, given the right circumstances, it
could lead to unnecessarily loading <strikethrough>hundreds (or even
thousands)</strikethrough> a shitload of objects. I'm headed out for a
walk and a cig or two to mull this over.
Thanks for the suggestion, Adam.
--
Jason N Perkins
More information about the talk
mailing list