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

Cache locale_identifiers() #644

Merged
merged 1 commit into from
May 27, 2019
Merged

Conversation

akx
Copy link
Member

@akx akx commented May 27, 2019

Fixes #620

This speeds up the test code from #620 19-fold on my machine:

(babel) ~/b/babel (master) $ python exp_issue_620.py
7.1793154459999995
(babel) ~/b/babel (cache-locale-identifiers) $ python exp_issue_620.py
0.359975983

@codecov-io
Copy link

codecov-io commented May 27, 2019

Codecov Report

Merging #644 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #644      +/-   ##
==========================================
+ Coverage   90.54%   90.55%   +<.01%     
==========================================
  Files          24       24              
  Lines        4135     4138       +3     
==========================================
+ Hits         3744     3747       +3     
  Misses        391      391
Impacted Files Coverage Δ
babel/localedata.py 95.53% <100%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c59f09...d883e14. Read the comment docs.

@akx akx merged commit bd2c44b into python-babel:master May 27, 2019
@akx akx deleted the cache-locale-identifiers branch May 27, 2019 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

localedata.locale_identifiers is slow
2 participants