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 scalafix instantiation above is very costly in terms of IO, but above all CPU as it effectively classloads Scalafix together with the entire scala standard library (with a cold JIT cache), even if scalafixScalaBinaryVersion matches Mill's scala binary version.
I believe adding a Mill worker to hold this instance would greatly benefit to the perceived performance of scalafix on projects with multiple modules or for users calling scalafix repeatedly. sbt-scalafix does something similar almost from day one, and a while ago this regressed, causing a ~10x invocation runtime regression on builds with many modules.
The text was updated successfully, but these errors were encountered:
bjaglin
changed the title
Memoize scalafix instantiation cost across modules & invocations
Memoize scalafix instance across modules & invocations
Jan 7, 2024
mill-scalafix/mill-scalafix/src/com/goyeau/mill/scalafix/ScalafixModule.scala
Lines 53 to 54 in 8179e4f
The scalafix instantiation above is very costly in terms of IO, but above all CPU as it effectively classloads Scalafix together with the entire scala standard library (with a cold JIT cache), even if
scalafixScalaBinaryVersion
matches Mill's scala binary version.I believe adding a Mill worker to hold this instance would greatly benefit to the perceived performance of scalafix on projects with multiple modules or for users calling scalafix repeatedly. sbt-scalafix does something similar almost from day one, and a while ago this regressed, causing a ~10x invocation runtime regression on builds with many modules.
The text was updated successfully, but these errors were encountered: