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

Feature: Introduce a simple mode to only get code, translations for country and state #508

Open
wingice opened this issue Mar 11, 2018 · 2 comments

Comments

@wingice
Copy link
Contributor

wingice commented Mar 11, 2018

In most scenarios, Applications need only code, proper display label(translations) for countries and states, is it possible to introduce a simple mode to only support those fields to reduce memory cost?

@rposborne
Copy link
Collaborator

Seems very possible, as there is lots of lazy loading code in place for translations (the bulk of the memory weight) I think it might be good to first determine the actual benefit. Which you should be able to do by basically emptying the contents of the yaml files, and running a performance test.

I believe the only thing we need at runtime for the data you request is the code itself, which we could get from just the file name to avoid loading the documents themselves.

That being said, I am way over capacity and won't be able to devote any time to this. But I am happy to guide you along in a PR.

@wingice
Copy link
Contributor Author

wingice commented Mar 18, 2018

Thanks for the update. I'm asking this because I'm implementing country-state cascade select boxes now. An light solution is enough for my need. But you are right, maybe we should measure the performance first. :-)

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

No branches or pull requests

2 participants