Book Image

JavaScript at Scale

By : Adam Boduch
Book Image

JavaScript at Scale

By: Adam Boduch

Overview of this book

Table of Contents (17 chapters)
JavaScript at Scale
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Performance implications


We'll close the chapter out with an overview of the performance implications introduced by the various configuration areas discussed thus far. If we really need configuration values in one area because they add value, they may hurt performance overall—so we need to offset this cost somehow.

Configurable locale performance

By far the most noticeable performance bottleneck concerning locales is the initial load. That's because we have to load all the locale data before anything is actually rendered for the user. This includes string message translations, as well as all the other data necessary for localization. The performance during initialization is constrained further when there's more than one locale loaded up-front.

The best way to improve the load performance is to only load the locale that the user actually wants. Once they've set this preference, they're unlikely to change it frequently, so there's no real benefit to having other locale data nearby and ready.

There...