@@ -451,7 +451,7 @@ You can then visualize it with `$BROWSER bloop-profile-initial.svg`.
451
451
452
452
After we' re all set up, we' ll then get an ` svg` file that looks like this:
453
453
454
- [! [Initial flamegraph of implicit search in ` frontend` ](/resources/img/blog/bloop-profile-0.svg )](/resources/img/blog/bloop-profile-0.svg)
454
+ [! [Initial flamegraph of implicit search in ` frontend` ](/resources/img/blog/bloop-profile-0.png )](/resources/img/blog/bloop-profile-0.svg)
455
455
456
456
(The flamegraph is a png image. You can check the svg by opening the image in
457
457
a new tab and replacing ` png` by ` svg` in the URL. The svg images allows you to
@@ -669,7 +669,7 @@ exploration.
669
669
#### Reading the implicit search flamegraph
670
670
671
671
672
- [](/resources/img/blog/bloop-profile-0.svg)
672
+ [](/resources/img/blog/bloop-profile-0.svg)
673
673
674
674
The flamegraph has three colors. Every color has a meaning.
675
675
@@ -693,7 +693,7 @@ shapeless.Strict[caseapp.core.Parser[bloop.cli.Commands.Run]] (id 12121) (expand
693
693
` ` `
694
694
695
695
On every stack trace, you have also the information about the timing. The
696
- unit of time is nanoseconds. So one million ns is one second. We use
696
+ unit of time is nanoseconds. So one billion ns is one second. We use
697
697
nanoseconds because flamegraphs cannot display decimal values and we don' t
698
698
want to lose time precision.
699
699
@@ -749,7 +749,7 @@ Great! Well, let's check the compile time and flamegraphs now.
749
749
typer : 1 spans, ()13625.005ms (71.5%)
750
750
```
751
751
752
- [](/resources/img/blog/bloop-profile-1.png )
752
+ [](/resources/img/blog/bloop-profile-1.svg )
753
753
754
754
The compile time is 2.5x faster. Not bad for a two line change. The duration
755
755
of implicit search accounts for 13 seconds, roughly ~95% of typer.
@@ -869,7 +869,7 @@ time spent in implicits : 13515 spans, ()12409.099ms (95.4%)
869
869
time spent in macroExpand : 17175 spans, ()11974.695ms (92.0%)
870
870
` ` `
871
871
872
- [! [Implicit flamegraph after shapeless change](/resources/img/blog/bloop-profile-2.png)](/resources/img/blog/bloop-profile-2.png )
872
+ [! [Implicit flamegraph after shapeless change](/resources/img/blog/bloop-profile-2.png)](/resources/img/blog/bloop-profile-2.svg )
873
873
874
874
The change had a mild positive effect -- we gained two seconds. This change
875
875
seems to have removed the log we saw before and some of the failed implicit
@@ -982,7 +982,7 @@ the changed version.
982
982
typer : 1 spans, ()11360.512ms (71.1%)
983
983
```
984
984
985
- [](/resources/img/blog/bloop-profile-3.png )
985
+ [](/resources/img/blog/bloop-profile-3.svg )
986
986
987
987
The new caching only shaves around ~600ms of compile times. Let' s check
988
988
compiling with our new case-app now.
@@ -992,7 +992,7 @@ compiling with our new case-app now.
992
992
typer : 1 spans, ()5074.836ms (68.3%)
993
993
` ` `
994
994
995
- [! [Flamegraph after case-app change](/resources/img/blog/bloop-profile-4.png)](/resources/img/blog/bloop-profile-4.png )
995
+ [! [Flamegraph after case-app change](/resources/img/blog/bloop-profile-4.png)](/resources/img/blog/bloop-profile-4.svg )
996
996
997
997
Bingo! Most of the time-consuming failed implicit searches are gone and
998
998
compilation time has halved. Our hypothesis is confirmed: the ` Strict` macro
@@ -1038,7 +1038,7 @@ implicit val testParser: Parser[Commands.Test] = Parser.generic
1038
1038
typer : 1 spans, ()7925.156ms (78.0%)
1039
1039
```
1040
1040
1041
- [](/resources/img/blog/bloop-profile-5.png )
1041
+ [](/resources/img/blog/bloop-profile-5.svg )
1042
1042
1043
1043
We' re in the right direction, but there doesn' t seem to be any
1044
1044
straightforward way of decreasing that compilation time anymore.
@@ -1135,7 +1135,7 @@ And now let's check the compilation time.
1135
1135
typer : 1 spans, ()5435.895ms (74.6%)
1136
1136
```
1137
1137
1138
- [](/resources/img/blog/bloop-profile-6.png )
1138
+ [](/resources/img/blog/bloop-profile-6.svg )
1139
1139
1140
1140
Great, that reduced compile times by 3 more seconds. You can continue the
1141
1141
same strategy over and over. This is where we stop; we have already cached the
@@ -1190,7 +1190,7 @@ change often as it is the case. Let's try out the new change!
1190
1190
typer : 1 spans, ()2887.031ms (64.0%)
1191
1191
```
1192
1192
1193
- [](/resources/img/blog/bloop-profile-7.png )
1193
+ [](/resources/img/blog/bloop-profile-7.svg )
1194
1194
1195
1195
Great! We now have a compile time under 5 seconds for an application that
1196
1196
still uses a powerful derivation mechanism, it' s easy to maintain and it' s
0 commit comments