aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorconner-c <[email protected]>2022-12-07 14:35:15 -0600
committerGitHub <[email protected]>2022-12-07 20:35:15 +0000
commitd0ff3fecc5e6eba355f64d11eca4549a405386c4 (patch)
tree1290481432123571c00f01f86f11c9398bdd4025 /README.md
parentf06126a1ba8515d6e0b7733999d5cd2f8849be7a (diff)
downloadfaker-d0ff3fecc5e6eba355f64d11eca4549a405386c4.tar.xz
faker-d0ff3fecc5e6eba355f64d11eca4549a405386c4.zip
docs: include hints on specifying a locale can help startup time (#1629)
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/README.md b/README.md
index d21fc5f5..93acf860 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,12 @@ Array.from({ length: 10 }).forEach(() => {
});
```
+The above code indicates a basic usage of Faker.
+The point of interest is the import statements at the top.
+The first import indicates how one can import the entirety of Faker, which includes every local, while the commented-out import showcases how to import only a single local.
+In most situations, importing a single local is preferable for performance because some testing frameworks reload imports for every test file, which causes startup latencies to add up quickly.
+Thus, limiting the import to a single locale can speed up startup times.
+
## 💎 Modules
An in-depth overview of the API methods is available in the [documentation](https://fakerjs.dev/guide/).