title: Passing Scala Map as an argument to a function takes too much time
body: <p>I have a scala companion object with a method which accepts a map as a parameter. Then in passes this map to another function in a different companion object with no changes. And the actual method call takes too much time when method execution is fast (I measured everything). If I don't pass a map (use null instead) it works fast, but with passing it as an argument, actual method call is very slow. </p>
  
  <p>Am I missing something, and Map is being recreated and not just a reference is passed?</p>
  
  <pre><code>object ContentElementParser {
      def parse(node: Node, assets: Map[String, Asset]): Option[ContentElement] = {
          //Some logic here
          AssetParser.getAsset(subNode, assets) //this call is too slow because of assets map
      }
  }
  
  object AssetParser {
      def getAsset(node: Node, assetMap: Map[String, Asset]): Asset = {
          //logic
      }
  }
  </code></pre>