I decided to give it a go against compiling Scala library. Here's what you need to do to get it working:
Where Temporary Path is printed by scalac-aspects script.
You need to cleanup quick-lib-timings output to get raw data. Then I did:
sort -nr -k 2 quick-lib-timings | head
6156427 407517 scala.collection.parallel.ParSeqLike.view source-/Users/grek/scala/scala/src/library/scala/collection/parallel/ParSeqLike.scala,line-327,offset=14012
5560684 334546 scala.collection.parallel.ParSeqLike.toString source-/Users/grek/scala/scala/src/library/scala/collection/parallel/ParSeqLike.scala,line-322,offset=13876
5560984 333943 scala.collection.parallel.ParIterableLike.toString source-/Users/grek/scala/scala/src/library/scala/collection/parallel/ParIterableLike.scala,line-354,offset=15279
5901514 254850 scala.collection.parallel.ParIterableLike.view source-/Users/grek/scala/scala/src/library/scala/collection/parallel/ParIterableLike.scala,line-844,offset=36659
5914662 233409 scala.collection.parallel.anon$1.seq source-/Users/grek/scala/scala/src/library/scala/collection/parallel/ParIterableLike.scala,line-848,offset=36858
5925677 221659 scala.collection.IterableLike.view source-/Users/grek/scala/scala/src/library/scala/collection/IterableLike.scala,line-299,offset=9822
5944196 198424 scala.collection.IterableLike.view source-/Users/grek/scala/scala/src/library/scala/collection/IterableLike.scala,line-294,offset=9659
It's interesting to see that type defined in ParSeqLike.toString takes 0.3s to compute. Let's see what other events occurred during that type completion:
awk -v startTime=5560684 -v duration=334546 '($1 >= startTime && $1 < startTime+duration) { print }' quick-lib-timings
Now you can see the challenge. Completing type in ParSeqLike.toString triggers completion of 528 other types. Alternatively, you could think that some nested events occur while other event occurs. In order to get any sense of such data we need some tool to visualize events and their nested structure. In the past I used to hack
Speed Tracer Chrome extension to display my own events instead of browser events. However, the extension appears to be broken at the moment.
I tried to find other, easy to use tool that could offer functionality similar to Speed Tracer when it comes to visualizing events but I couldn't find one.
I thought I'd ping performance oriented folks hanging around here to see if they can share so ideas how to deal with this. Also, if there's anybody with Javascript-fu that is feeling like hacking something simple that could visualize nested events that would be great too.
I have to leave this at this stage because I'm busy with other work.
--
Grzegorz Kossakowski