Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 46753
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: cpan.blue [...] spam.la
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.52



Subject: Cache TimeZone objects
Please have the DateTime module automatically cache TimeZone objects as they are used. The following url is a benchmarking script demonstrating an order or magnitude performance increase when this is done: http://urth.org/~autarch/dt-bench This would especially be useful for DBIx::Class
Subject: Re: [rt.cpan.org #46753] Cache TimeZone objects
Date: Mon, 8 Jun 2009 17:40:42 -0500 (CDT)
To: Bug Menot via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Mon, 8 Jun 2009, Bug Menot via RT wrote: Show quoted text
> Please have the DateTime module automatically cache TimeZone objects as > they are used. > > The following url is a benchmarking script demonstrating an order or > magnitude performance increase when this is done: > http://urth.org/~autarch/dt-bench
Uh, that's _my_ benchmark. Yes, I know it's faster. However, the DateTime module is not in a good position to decide whether or not to cache the local zone (local zones change!). Your app is in a much better position to handle this. A doc patch about the dangers of passing in "time_zone => local" repeatedly would be welcome, however. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
On Mon Jun 08 18:41:03 2009, autarch@urth.org wrote: Show quoted text
> On Mon, 8 Jun 2009, Bug Menot via RT wrote: >
> > Please have the DateTime module automatically cache TimeZone objects as > > they are used. > > > > The following url is a benchmarking script demonstrating an order or > > magnitude performance increase when this is done: > > http://urth.org/~autarch/dt-bench
> > Uh, that's _my_ benchmark. > > Yes, I know it's faster. However, the DateTime module is not in a good > position to decide whether or not to cache the local zone (local zones > change!). Your app is in a much better position to handle this. > > A doc patch about the dangers of passing in "time_zone => local" > repeatedly would be welcome, however.
This ticket might be resolvable now, if the warning currently in the docs is considered sufficient here: https://metacpan.org/module/DateTime#Time-Zone-Warnings Mark