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

Speed up localization synching #107

Closed

Conversation

sjaindl
Copy link

@sjaindl sjaindl commented Dec 14, 2020

We noticed the same crashes when updating entries that have been fixed in the latest 0.17.2 release (bb43c16).

I have compared our 2 fixes and found out that our solution has a better performance when there are multiple locales. Did a few time measurements on the different environments we have. They each have 2-4 localizations.
I can attach some measured times if you are interested.

This commit optimizes the locales loop from O(L^2) to O(L) runtime by using a dictionary lookup instead of a linear array search. This especially increases performance when there are many localizations.

@tomkowz
Copy link
Contributor

tomkowz commented Dec 14, 2020

Hello @sjaindl! Thanks for catching that and creating this PR. I'll create separate PR that will consist of your addition and with one more change for creating/updating assets. I noticed there might be issue when you have localized assets and then you may end up with the same invalid behaviour like we had in 0.17.1.

Many thanks!

@tomkowz tomkowz mentioned this pull request Dec 14, 2020
@tomkowz
Copy link
Contributor

tomkowz commented Dec 14, 2020

@sjaindl 0.17.3 is released now. Many thanks for your input!

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.

None yet

2 participants