Debug: chậm, không tối ưu, có debug symbol, bật hot reload, chạy JIT.
- Dùng khi phát triển.
- Profile: tối ưu như release nhưng giữ profiling tool; hot reload bị tắt.
- Dùng để test hiệu năng mà không có artifact của debug.
- Release: tối ưu hoàn toàn, minified, biên dịch native code với AOT, kích thước nhỏ nhất, hiệu năng tốt nhất.
- Dùng để phân phối.
- Chọn mode phù hợp cho từng tác vụ.
- Debug: slow, unoptimized, enables hot reload, runs with JIT — use during development.
- Profile: optimized like release but includes profiling tools — use to test performance accurately.
- Release: fully optimized, AOT compiled, smallest size, best performance — use for distribution.