![]() According to https://v8.dev/blog/cost-of-javascript-2019#json If you use JSON.parse instead of object literals for large objects like our i18n strings, it is faster. Testing this locally in prod mode it made the time to evaluate main.js go from 783ms (https://cl.ly/371ceb866fe4) to 607ms (https://cl.ly/c2ce9eb82f7e) Test plan: * i18n strings should work the same as they always have * pages should load a tiny bit faster in prod Change-Id: Icc3dbd07e87f60d40e523d454917f865fdb39d7d Reviewed-on: https://gerrit.instructure.com/199209 Tested-by: Jenkins Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com> |
||
---|---|---|
.. | ||
lib | ||
spec | ||
.rspec | ||
Gemfile | ||
Rakefile | ||
i18n_tasks.gemspec | ||
test.sh |