On Tue, 5 Aug 2014, David E. Wheeler wrote:

On Aug 5, 2014, at 4:18 PM, Olivier Mengué <olivier.men...@gmail.com> wrote:

Here is below the output (latest releases of DateTime, DateTime::Locale, 
DateTime::TimeZone on perl 5.20.0).
DateTime::Locale::Catalog is the module that contains all the locales names.
David, is it that module that you worry about or have you found something worse?

I think the overhead comes in the DateTime::Locale::_register() function, which 
is called once for each locale returned by DateTime::Locale::Catalog. I would 
not think any locales would be loaded until they were needed.

And you would be correct. The individual locale classes are not loaded until you call DateTime::Locale->load

What could speed things up would be to pre-generate the data structures that are built by calling ->register on everything in the Catalog module.

That all said, DT::Locale is woefully crufty and out of date. I haven't kept up to date with the CLDR data for years because the approach that DT::Locale uses to generate individual locales makes it incredibly hard to deal with data format changes in CLDR.

Nick Patch had mentioned that he was interested in working on proper CLDR support for Perl (which is more than just DateTime info), and I was hoping he'd take all this over ;)


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

Reply via email to