Re: DateTime::Lite

[email protected] (Dave Rolsky)
Newsgroups perl.datetime
Message-ID <[email protected]>
On Sat, 22 Nov 2008, Daisuke Maki wrote:

> =item Non-essential methods are loaded on demand
>
> A lot of times you don't even need to do date time arithmetic, for
> example. These methods are separated out onto a different file, so you
> need to load it on demand.
>
>    use DateTime::Lite qw(Arithmetic);
>    use DateTime::Lite qw(Strftime);

Have you actually benchmarked the memory usage and compile speed for this 
stuff? I have a hard time imagining it really is all that slow, since it 
amounts to a few methods in each case.

> Singletons are okay, they serve a particular purpose. But besides being
> a memory hog of relative low benefit, when given the number of time
> zones are locales, they are just way too overwhelming for underlings.

Could you explain this? What are you doing instead of singletons? Do you 
reload the time zone every time it's asked for?

Also, that second sentence makes no sense ;)

> With this version, the objects are mostly the just plain objects, and
> the exact definition for each timezone/locale is stored in data files.

What do the data files look like? If using them is faster than the current 
DT::TZ implementation, is there any reason we can't switch DT::TZ to use 
it?


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.