Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Mention information that may exist in unoptimized builds #21147

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion site/source/docs/optimizing/Optimizing-Code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
Optimizing Code
===============

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.
Generally you should first compile and run your code without optimizations,
which is the default when you just run ``emcc`` without specifying an
optimization level. Such unoptimized builds contain some checks and assertions
that can be very helpful in making sure that your code runs correctly. Once it
does, it is highly recommended to optimize the builds that you ship, for
several reasons: First, optimized builds are much smaller and faster, so they
load quickly and run more smoothly, and second, **un**-optimized builds contain
debug information such as the names of files and functions, code comments in
JavaScript, etc. (which aside from increasing size may also contain things you
do not want to ship to your users).

The rest of this page explains how to optimize your code.

How to optimize code
====================
Expand Down