Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching the local timezone #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BikesAndBBQ
Copy link

I was profiling our application that's using DynamoDB, and the creation of the DateTime::TimeZone objects in _init_security_token turns out to be very expensive. This change would potentially cause problems on systems where the local timezone changes, so definitely let me know if you have any concerns.

This is a pretty major performance improvement in my application, so if you're hesitant to potentially break people on systems with changing local timezones, maybe I could make this a configuration option instead of caching by default?

@frioux
Copy link
Collaborator

frioux commented Aug 4, 2017

FWIW We (ZR) aren't using this module, but I am willing to accept pull requests that improve things. If someone in the future wants me to accept a pr that fixes the same thing as this PR, please migrate from DateTime to parsed epochs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants