CPU spikes to 100%, super slow auto-compilation or indexing

I see this happen when working with Scala and a library called Quickfix. Basically the code becomes slow and unresponsive. It looks to me that it is caused by Scala plugin because if I turn it off and create a Java Gradle project it stops happening.

How To Reproduce:

1. Import dependency


val quickfixVersion = "2.3.1"
libraryDependencies += "org.quickfixj" % "quickfixj-messages-fix50sp2" % quickfixVersion

2. Start coding. Try to call some objects from the lib:

object Bla {

val report = new ExecutionReport()
val clOrdID = new ClOrdID()
report.get(clOrdID) // at this point you can see the spike


Other settings:
- Intellij version 2021.3.3
- Scala plugin 2021.3.20