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
Lazy load of locale data #14
Conversation
I wonder if there's a way to do save memory without having to move everything out into separate files. For example, rather than putting the locale data in |
Hmm, I wrote the previous comment and then I remembered e1a4063 |
Maybe just store data into separate file, not in DATA. But the one problem I see - how to find it's location from code. Any suggestions? |
I was thinking of that too. It could even be one file per locale. Mostly what I'd like to avoid is shipping hundreds of namespaces, since each namespace you create also uses memory. I think |
@autarch could you help me with Dist::Zilla and File::ShareDir? How to use local directory during tests? How to install this directory? |
I think you just need to add |
Update from the original
5170d6a
to
e19368c
Compare
Sorry for the mess with commits. Should I create a new PR from the fresh fork? |
You can just rebase the branch. |
Using File::ShareDir for locale data
I ended doing my own version of this in #17. Thanks for suggesting this! |
Hi
In my code I have found that after removing unused locales it frees ~10Mb of RSS memory of process.
Here I'm trying to load locale data on demand - similar to DateTime::TimeZone
Commits includes full list of generated pm-per-locale files.