Skip to content

Conversation

@ryandrewjohnson
Copy link
Owner

@ryandrewjohnson ryandrewjohnson commented Jun 15, 2018

Performance improvements

  • WIP...

@thchia I've started introducing the fixes discussed in this issue #85. In addition to getTranslationsForLanguage being slow I also found that getSingleToMultilanguageTranslation was also extremely slow with large amounts of data, and also used array.reduce. I've swapped these both out to use plain ol' for loops, and the results seem to be really good.

In order to test these scenarios I added a seed translations script that allows for you to easily create dummy translation files with large sets of data. I've pumped up the translations to 20,000, and while there is slight lag I believe there is still room for improvements.

If you want to run the demo locally you will need to use npm link to point it to the local version of react-localize-redux`.

@codecov
Copy link

codecov bot commented Jun 15, 2018

Codecov Report

Merging #92 into master will increase coverage by 0.32%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
+ Coverage   92.89%   93.21%   +0.32%     
==========================================
  Files           6        6              
  Lines         211      221      +10     
  Branches       61       61              
==========================================
+ Hits          196      206      +10     
  Misses         13       13              
  Partials        2        2
Impacted Files Coverage Δ
src/utils.js 93.75% <100%> (+1.15%) ⬆️

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 2a26a48...ab1df45. Read the comment docs.

@ryandrewjohnson ryandrewjohnson merged commit 2c226fb into master Jun 18, 2018
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.

2 participants