Skip to content

Commit 50a7531

Browse files
authored
[Docs] Mention information that may exist in unoptimized builds (#21147)
Fixes #21084
1 parent b25e4c1 commit 50a7531

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

site/source/docs/optimizing/Optimizing-Code.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44
Optimizing Code
55
===============
66

7-
Generally you should first compile and run your code without optimizations (the default). Once you are sure that the code runs correctly, you can use the techniques in this article to make it load and run faster.
7+
Generally you should first compile and run your code without optimizations,
8+
which is the default when you just run ``emcc`` without specifying an
9+
optimization level. Such unoptimized builds contain some checks and assertions
10+
that can be very helpful in making sure that your code runs correctly. Once it
11+
does, it is highly recommended to optimize the builds that you ship, for
12+
several reasons: First, optimized builds are much smaller and faster, so they
13+
load quickly and run more smoothly, and second, **un**-optimized builds contain
14+
debug information such as the names of files and functions, code comments in
15+
JavaScript, etc. (which aside from increasing size may also contain things you
16+
do not want to ship to your users).
17+
18+
The rest of this page explains how to optimize your code.
819

920
How to optimize code
1021
====================

0 commit comments

Comments
 (0)