Hello all,I wanted to share with this list the release of DateTime::Lite v0.1.0 on CPAN: https://metacpan.org/pod/DateTime::Lite
First and foremost: DateTime is a remarkable piece of work, and DateTime::Lite would not exist without it. It is derived directly from DateTime's codebase, its API is intentionally compatible, and the debt to Dave Rolsky and the many contributors to DateTime and DateTime::TimeZone is explicitly acknowledged in the distribution.
The motivation was practical: in short-lived processes (scripts, CGI handlers, microservices), DateTime's dependency footprint and startup cost are a real consideration. DateTime::Lite attempts to address those cases without sacrificing correctness or compatibility.
The main differences: - 67 modules loaded vs 137 for DateTime (measured on aarch64, Perl 5.36.1)- Lower memory footprint in short-lived processes: each DateTime::TimeZone zone object, once constructed, stays in memory for the lifetime of the process via Class::Singleton (a dependency of DateTime::TimeZone), and its .pm file remains in %INC. DateTime::Lite::TimeZone keeps all data on disk and only loads what is needed per query, unless enable_mem_cache is active. - RSS after 'use Module': ~27 MB (DateTime::Lite) vs ~26 MB (DateTime), comparable at startup, but DateTime::Lite includes DBD::SQLite (~14 MB of compiled native code). The TimeZone class alone is lighter: ~14 MB (DateTime::Lite) vs ~17 MB (DateTime)
- ~32 ms cold require vs ~48 ms- DateTime::Lite::TimeZone bundles all IANA zone data in a single pre-built SQLite database, parsed directly from TZif binaries (RFC 9636, versions 1-4), with the POSIX footer TZ string stored and evaluated at runtime for correct future-date calculations - Any valid Unicode CLDR / BCP 47 locale tag works out of the box (for example: he-IL-u-ca-hebrew-tz-jeruslm), resolved dynamically via DateTime::Locale::FromCLDR and Locale::Unicode::Data - Errors return undef (or an empty list in list context) rather than dying (fatal mode available via fatal => 1 or $DateTime::Lite::FATAL_EXCEPTIONS = 1) - XS-accelerated calendar arithmetic, and computation of future-date calculation reusing C code from IANA's open-source tzcode. - FREEZE/THAW (Sereal/CBOR) and TO_JSON serialisation in addition to Storable
The full public API of DateTime is implemented. A benchmark script is included in the distribution.
I am posting here out of respect for this list and its members, and in the spirit of transparency. If anyone has feedback, concerns, or spots anything I have missed, I would very much welcome it.
Repository: https://gitlab.com/jackdeguest/DateTime-Lite Thank you again to everyone who has contributed to DateTime over the years. Kind regards, Jacques Deguest (JDEGUEST)
OpenPGP_0x5F3C0261CDB2E752.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
