Skip to content

Commit 4b90258

Browse files
committed
Make the potential downsides much more emphatic and clear
1 parent b5846cb commit 4b90258

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

content/inside-rust/call-for-testing-hint-mostly-unused.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ instance, the `windows` crate in the first example goes from building in 15.1s
6262
of which 49% is codegen, to building in 7.5s of which 1% is codegen.
6363

6464
Note that this option does not provide a universal performance improvement for
65-
every crate. Using it for crates whose API surface is mostly used, and/or used
66-
in multiple different crates or binaries (e.g. multiple test binaries that each
67-
test a substantial swath of the API), may result in redoing code generation for
68-
the same items repeatedly.
65+
every crate; if used when not applicable, this option can make builds much
66+
*slower*. Deferring compilation of the items in a crate can lead to redoing
67+
code generation for those items repeatedly. In particular, avoid using this
68+
hint for crates whose API surface is mostly used, and/or used in multiple
69+
different crates or binaries (e.g. multiple test binaries that each test a
70+
substantial swath of the API). Always do performance analysis when considering
71+
this hint.
6972

7073
Also note that this only provides a performance win if you are rebuilding the
7174
dependency. If you're only rebuilding the top-level crate, this won't help.

0 commit comments

Comments
 (0)