# Scala Level 12: Performance & Production

> Level 12: Performance & Production of the LoWisa Scala course: JVM Performance, Functional Allocation Trade-Offs, Production Scala Design. 3 lessons and 9 ideas, each explained in one line.

Performance & Production is level 12 of 13 of the [LoWisa Scala course](/courses/scala/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## JVM Performance

- **Profile first.** JVM **profilers** read Scala natively: flame graphs name your lambdas and pipelines.
- **Collection costs.** Chained transforms allocate intermediates: **views** or single folds where measurement says so.
- **Benchmarking.** **JMH** benchmarks Scala honestly: warmup, forks, statistics: or the JIT writes fiction.

## Functional Allocation Trade-Offs

- **Immutability costs.** Persistent structures allocate: usually fine, **measured** when hot.
- **Specialisation.** Hot numeric code avoids boxing: **arrays** and while loops allowed where profiled.
- **The pragmatic core.** Idiomatic Scala is pure at the design level and **pragmatic** in proven hot loops: documented exceptions.

## Production Scala Design

- **Config and logging.** Typed **configuration** and structured logging: production Scala observable like any JVM service.
- **Graceful shutdown.** Services release resources through **bracket**/Resource patterns: shutdown as a composed effect.
- **Boring where it counts.** Production Scala keeps the **boring** virtues: pinned versions, small dependencies, one idiom per problem.

## Before and after this level

- **Before:** [Level 11: Build & Testing](/courses/scala/level-11-build-and-testing/): SBT, Testing, Package and Module Design.
- **Next:** [Level 13: Scala Mastery](/courses/scala/level-13-scala-mastery/): Advanced Types, Functional Architecture, Reading and Improving Complex Scala.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does Scala Level 12: Performance & Production cover?

JVM Performance, Functional Allocation Trade-Offs, Production Scala Design: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 11: Build & Testing, which covers SBT, Testing, Package and Module Design.

## Learn Scala on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/scala/level-12-performance-and-production/ · Updated 2026-11-30
