Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 59758
Status: resolved
Priority: 0/
Queue: MongoDB

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.35
Fixed in: 0.702.0



Subject: Use DateTime::Tiny to cut the fat
Hi, Kristina mentioned at OSCON that DateTime was a bit of a pig and dragging down MongoDB performance. DateTime::Tiny might help. It creates a very light object which will turn itself into a real DateTime object only when necessary. Simple methods and stringification will not cause a DateTime object to be created. It doesn't do validation on its arguments, so DateTime::Tiny->new( year => 2010, month => 32 ) will work where it won't work with DateTime. You still have to depend on DateTime, DateTime::Tiny will only load it if its available. Unfortunately, DateTime::Tiny doesn't automatically upgrade to DateTime. You currently have to tell it. I just submitted a patch to make it do it automatically. See https://rt.cpan.org/Ticket/Display.html?id=59757 Hopefully it will be accepted. If not, you can take the AUTOLOAD, put it into a DateTime::Tiny subclass and it will work.