Skip to content

Commit

Permalink
Fix grammar issues in best-practices.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Oct 2, 2024
1 parent e5fa88b commit 156afb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions building/tooling/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Tooling runs as one-off, short-lived Docker container:
3. The Docker container is destroyed

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

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

First, the `pre-compiled` directory is copied into the image.
This directory is setup as a sort of fake exercise and depends on the same base libraries that the actual exercise depend on.
This directory is set up as a sort of fake exercise and depends on the same base libraries that the actual exercise depends on.
Then we run the tests on that directory, which is similar to how tests are run for an actual exercise.
Running the tests will result in the base being compiled, but the difference is that this happens at _build time_.
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.
Expand All @@ -91,7 +91,7 @@ You should try to reduce the image's size, which means that it'll:

- Be faster to deploy
- Reduce costs for us
- Improve startup time of each container
- Improve the startup time of each container

### Try different distributions

Expand Down

0 comments on commit 156afb4

Please sign in to comment.