Skip to content

Commit 7d27fc4

Browse files
committed
Elevate parentheticals
1 parent 27a59da commit 7d27fc4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

blog/_posts/2018-06-04-scalac-profiling.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ It turns out that the use of Scala's implicits as well as macros can greatly
1313
increase compilation times, depending on how they are used and how your
1414
codebase is organized. Codebases that make use of libraries like [Shapeless],
1515
or which rely on typeclass derivation, may be particularly prone to these
16-
slow-downs. (As of Scala 2.12, typeclass derivation is based on
17-
implicitly-triggered macro expansions.)
16+
slow-downs. As of Scala 2.12, typeclass derivation is based on
17+
implicitly-triggered macro expansions.
1818

1919
The goal of this blog post is to help you understand when these things are
2020
happening in your code, so you can remove code that triggers unnecessary
@@ -194,9 +194,9 @@ Add the compiler flag to the field `options` inside the
194194
automatically pick up your changes and add the compiler option without the
195195
need of a `reload`.
196196

197-
(If you use sbt, add `scalacOptions in Compile += "-Ystatistics"` to your
197+
If you use sbt, add `scalacOptions in Compile += "-Ystatistics"` to your
198198
project settings. If you want to profile tests scope it to `Test` instead of
199-
`Compile`.)
199+
`Compile`.
200200

201201
Run `bloop compile frontend -w --reporter scalac` (we use the default scalac
202202
reporter for clarity) and have a look at the data. The output of the
@@ -300,9 +300,9 @@ dependent types, type projections or abstract types in a more general way.
300300
In the case of `frontend`, the durations of all these operations are
301301
reasonable, which hints us that the inefficiency is elsewhere.
302302

303-
(For most of the cases, these timers are unlikely to be high when typechecking
303+
For most of the cases, these timers are unlikely to be high when typechecking
304304
your program. If they are, try to figure out why and file a ticket in
305-
`scala/bug` so that either I or the Scala team can look into it.)
305+
`scala/bug` so that either I or the Scala team can look into it.
306306

307307
### The troublemaker
308308

@@ -771,14 +771,14 @@ when finding an implicit for `HListParser` (which takes type parameters
771771
[inferred from its other functional
772772
dependencies](https://github.com/alexarchambault/case-app/blob/v1.2.0/core/shared/src/main/scala/caseapp/core/Parser.scala#L77-L84)).
773773
774-
Let's further debug this with `-Xlog-implicits` (by adding it to the scalac
775-
options of the bloop configuration file).
774+
Let's further debug this by adding `-Xlog-implicits` to the scalac
775+
options of the bloop configuration file.
776776
777-
(This is a good moment to try to minimize the problem. `-Xlog-implicits` will
777+
This is a good moment to try to minimize the problem. `-Xlog-implicits` will
778778
log a lot of failed searches and we want to be able to see through the noise.
779779
I did minimise the issue
780780
[here](https://github.com/scalacenter/scalac-profiling/pull/23/commits/dbcb8d480e9b402899d21620055bc555b2841382).
781-
Doing `implicitly[Parser[CliOptions]]` also reproduces it.)
781+
Doing `implicitly[Parser[CliOptions]]` also reproduces it.
782782
783783
Among all the logs, this is the one that attracts my attention the most.
784784
@@ -1006,12 +1006,12 @@ experienced with the codebase have a look at it. If we're lucky, someone will
10061006
fix this issue upstream soon and we'll benefit from this speed up when we
10071007
upgrade.
10081008
1009-
(After discussing this issue with [Miles](https://github.com/milessabin/) we
1009+
After discussing this issue with [Miles](https://github.com/milessabin/) we
10101010
both agree the strict/lazy macro is not handling refinement types correctly
10111011
and that this performance penalty is a bug. This bug will most likely be fixed
10121012
in a future version of Shapeless after 2.3.3 for all its users. Some of these
10131013
performance implications will be gone with Scala 2.13, that adds by-name
1014-
implicits to the compiler.)
1014+
implicits to the compiler.
10151015
10161016
#### Deduplicating more expansions
10171017

0 commit comments

Comments
 (0)