develooper Front page | perl.datetime | Postings from May 2012

DateTime performance

Thread Next
From:
Philipp K. Janert
Date:
May 3, 2012 01:52
Subject:
DateTime performance
Message ID:
201205011529.01222.janert@ieee.org

Question:

When using DateTime for a large number of
instances, it becomes a serious performance
drag. 

A typical application for me involves things like
log files: I use DateTime to translate the timestamps 
in these files into a canonical format, and then get 
information such as "day-of-week" or "time-of-day" 
from DateTime. 

However, when working through a files with a few 
tens of millions of records, DateTime turns into a 
REAL drag on performance.

Is this expected behavior? And are there access
patterns that I can use to mitigate this effect? 
(I tried to supply a time_zone explicitly, but that
does not seem to improve things significantly.)

Best,

		Ph.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About