配置文件Scala3编译器

发布于 2025-02-12 11:20:53 字数 144 浏览 0 评论 0原文

我们有一个Scala3项目,可以使用宏。我们使用带有金属插件的Visual Studio代码。

SBT Clean Compile

花了20分钟的时间。有什么方法可以介绍scala3 编译器要弄清楚那个时间的去向?

We have one Scala3 project where we use macros. We use Visual Studio Code with Metals plugin.

sbt clean compile

tooks more then 20 minutes. Is there any way to profile Scala3
compiler to figure out where that time goes?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凌乱心跳 2025-02-19 11:20:53

您可以在build.sbt中设置CompilerFlag“ -vprofile”。

scalacOptions += "-Vprofile"

它将输出文件的复杂性。至少,它会给您一个提示,其中会花费很多时间。

也许这对您也很有趣:
scala sbt-测量子主题的任务时间

You can set the compilerflag "-Vprofile" in your build.sbt.

scalacOptions += "-Vprofile"

It will output the complexity of your files. At least, it will give you a hint, where a lot of compile time will be spend.

Maybe this will be interesting for you as well:
Scala Sbt - Measure task time for subprojects

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文