Skip to content

Fix slowness in showMvnDepsTree - #6863

Merged
lihaoyi merged 1 commit into
com-lihaoyi:mainfrom
lihaoyi:mvn-deps-tree
Feb 22, 2026
Merged

lihaoyi merged 1 commit into
com-lihaoyi:mainfrom
lihaoyi:mvn-deps-tree

Conversation

@lihaoyi

@lihaoyi lihaoyi commented Feb 22, 2026

Copy link
Copy Markdown
Member

Vibe coded

Implemented a fix for issue #6823 by changing showMvnDepsTree to print via the unprefixed logger stream:

  • Changed /Users/lihaoyi/Github/mill/libs/javalib/src/mill/javalib/JavaModule.scala:1421
    • from Task.log.streams.out.println(rendered)
    • to Task.log.unprefixedStreams.out.println(rendered)

Why this fixes it:

  • jstack sampling during the hang showed main blocked in PromptLogger.awaitPumperEmpty while printing showMvnDepsTree output, i.e. output path throttling for massive trees.
  • Using unprefixedStreams bypasses that per-line prompt/prefix path for this large blob output.

Validation:

  • Ran ./mill -i libs.scalalib.test.testOnly mill.scalalib.CrossVersionTests
  • Result: all 7 tests passed.

I also reproduced the slow spark case and confirmed it gets stuck in logger output handling; the patch targets exactly that bottleneck.

@lefou

lefou commented Feb 22, 2026

Copy link
Copy Markdown
Member

This isn't fixing #6823.

@alexarchambault

alexarchambault commented Feb 22, 2026 •

Copy link
Copy Markdown
Collaborator

That makes things better for spark-sql at least. It seems that means PromptLogger#logPrefixedLine is the culprit here (Task.log.streams goes through it while Task.log.unprefixedStreams doesn't).

@lihaoyi
lihaoyi merged commit 1bebc5c into com-lihaoyi:main Feb 22, 2026
35 checks passed
@lefou lefou added this to the 1.1.3 milestone Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants