Skip to content

Commit 57d3756

Browse files
committed
Fix grammar issues in best-practices.md
1 parent e5fa88b commit 57d3756

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

building/tooling/best-practices.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ See the [network docs](/docs/building/tooling/docker#network) for more informati
4646

4747
### Prefer build-time commands over run-time commands
4848

49-
Tooling runs as one-off, short-lived Docker container:
49+
Tooling runs as a one-off, short-lived Docker container:
5050

5151
1. A Docker container is created
5252
2. The Docker container is run with the correct arguments
5353
3. The Docker container is destroyed
5454

5555
Therefore, code that runs in step 2 runs for _every single tooling run_.
56-
For this reason, reducing the amount of code that runs in step 2 is a great way to improve performance
56+
For this reason, reducing the amount of code that runs in step 2 is a great way to improve performance.
5757
One way of doing this is to move code from _run-time_ to _build-time_.
5858
Whilst run-time code runs on every single tooling run, build-time code only runs once (when the Docker image is built).
5959

@@ -72,7 +72,7 @@ RUN stack build --resolver lts-20.18 --no-terminal --test --no-run-tests
7272
```
7373

7474
First, the `pre-compiled` directory is copied into the image.
75-
This directory is setup as a sort of fake exercise and depends on the same base libraries that the actual exercise depend on.
75+
This directory is set up as a sort of fake exercise and depends on the same base libraries that the actual exercise depends on.
7676
Then we run the tests on that directory, which is similar to how tests are run for an actual exercise.
7777
Running the tests will result in the base being compiled, but the difference is that this happens at _build time_.
7878
The resulting Docker image will thus have its base libraries already compiled, which means that no longer has to happen at _run time_, resulting in (much) faster execution times.

0 commit comments

Comments
 (0)