On Mon, 28 Feb 2005, Geoffrey Young wrote:

now, because we have a ton of different things that need to be individually
wrapped in objects, this means a megaton of data will be floating around our
model objects, and even more floating around in our object caches.

so, the question I have is whether all that data is necessary to store in
the object upon creation?  that is, is it all precalculations such that we
can trade in object size for runtime efficiency?  perhaps not in the code as
it exists now, but is that something DateTime is open to, or is that data
more essential to the object than I realize?

The hugeness is the DateTime::TimeZone object, not DateTime itself. Those are all singletons, so you only pay the price once per time zone.


The ultimate fix is to implement this code in C with C data structures, I think.

Not doing the precalculations might be possible, but it'd make many things much slower, since the code that I use to generate this data is completely unoptimized. Plus it's ugly as hell ;)

Making loading the pre-calculated data _optional_, as opposed to removing it entirely, would be best. I'm open to a patch, but it's a lot of work, and not something I'd have time to do any time soon.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to