I struggle with long compile times.
At the moment I think the problem is the Type derivation for JSON marshalling.
So I created a simple project that lets me generate some case classes and enums.
It looks like circe takes twice as long as jsoniter.
I tested with 200 generated classes.
Results Circe:
[info] Sourcefile Lines Tokens Tasty Complexity/Line Directory
[info] JsoniterGenerator.scala 28 314 59 2.11 moderate /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests
[info] CirceGenerator.scala 26 316 60 2.31 moderate /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests
[info] Tester.scala 59 520 260 4.41 moderate /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests/generated
[info] Generated6.scala 66 442 512 7.76 high /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests/generated
.....
[info] -----------------------------------------------------------------
[info] Total 3347 22808 25451 7.60 high
[info] done compiling
[success] Total time: 68 s (01:08), completed 17 Sep 2023, 13:34:31
Results Jsoniter:
[info] Sourcefile Lines Tokens Tasty Complexity/Line Directory
[info] JsoniterGenerator.scala 28 314 59 2.11 moderate /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests
....
[info] Generated11.scala 63 422 476 7.56 high /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests/generated
[info] Tester.scala 204 2023 1076 5.27 high /Users/mpa/dev/experiments/scala3-compile-tests/src/main/scala/scala3/compile/tests/generated
[info] -----------------------------------------------------------------
[info] Total 12795 86631 95890 7.49 high
[info] done compiling
[success] Total time: 32 s, completed 17 Sep 2023, 13:40:07
So here my Questions:
- is there a way to decrease the compile time?
- are there Json Libraries that have faster compile times?
(Mac 2.6 GHz 6-Core Intel Core i7 / 32 GB 2667 MHz DDR4)