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

Allow for shared intl memoizer #13

Open
zbraniecki opened this issue Feb 7, 2021 · 0 comments
Open

Allow for shared intl memoizer #13

zbraniecki opened this issue Feb 7, 2021 · 0 comments

Comments

@zbraniecki
Copy link
Contributor

At the moment each new FluentBundle gets new IntlLangMemoizer and in result new PluralRules instance.

This has been floated around for a bit in projectfluent/fluent.js#218 and https://bugzilla.mozilla.org/show_bug.cgi?id=1475356

The Rust intl-memoizer has the concept of IntlMemoizer that stores its lang-memoizers internally, we could use it by having L10nRegistry instance have its own instance of IntlMemoizer which returns a reference to IntlLangMemoizer for a given lang that is then used by each FluentBundle.

We'd likely need to add a threadsafe version of that pan-lang memoizer.

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

1 participant