You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The incremental compilation of my project (scalacenter/scaladex) is slowed down by the webJars task.
If I run server/Test/compile twice without changing any source, it takes about 3 sec each and the time is spent on extracting the web jars and coyping the resources. That's kind of slow for a no-op incremental compilation.
$ sbt -Dsbt.task.timings=true
sbt:scaladex> server / Test / compile
[info] Total time: 2481 ms
[info] server / Web-assets / webJars : 824 ms
[info] server / Web-assets-test / webJars : 678 ms
[info] server / Compile / copyResources : 444 ms
[info] server / Web-assets / assets : 297 ms
...
[success] Total time: 3 s, completed May 19, 2023, 2:31:57 PM
sbt:scaladex> server / Test / compile
[info] Total time: 2431 ms
[info] server / Web-assets / webJars : 787 ms
[info] server / Web-assets-test / webJars : 677 ms
[info] server / Compile / copyResources : 469 ms
[info] server / Web-assets / assets : 283 ms
...
[success] Total time: 3 s, completed May 19, 2023, 2:34:03 PM
After some investigation I found out that most of the time is spent in:
[info] server / Compile / copyResources : 481 ms
[info] server / Web-assets / webJars : 419 ms
[info] server / Web-assets / assets : 361 ms
[info] server / Web-assets-test / webJars : 359 ms
But still, would it be possible to not touch the managed resources, so that sbt doesn't need to copy them?
The incremental compilation of my project (scalacenter/scaladex) is slowed down by the
webJars
task.If I run
server/Test/compile
twice without changing any source, it takes about 3 sec each and the time is spent on extracting the web jars and coyping the resources. That's kind of slow for a no-op incremental compilation.After some investigation I found out that most of the time is spent in:
sbt-web/src/main/scala/com/typesafe/sbt/web/SbtWeb.scala
Line 450 in ba7674e
Would it be possible to use some sort of caching to speed up this step?
The text was updated successfully, but these errors were encountered: