title: How Locale could be used in multithreaded application to improve performance
body: <p>In my application I have a method which is called by multiple threads simultaneously. Each thread calls this method many times while running.</p>
  
  <pre><code>private Locale trLoc = new Locale("tr", "TR");
  
  public double calculate(String arg1){
      arg1 = arg1.toUpperCase(trLoc);
  ...
  }
  </code></pre>
  
  <p>This method makes a <code>String.toUpperString(Locale)</code> call which causes a bottleneck because of the <code>HashTable</code> usage within the Locale class. Each thread waits other one while <code>toUpperCase</code> method operates. This situation slows down my application up to three times.</p>
  
  <p>Is there something I'm missing with the usage of the Locale or I must use another class for the same purpose?</p>
  
  <p>Thanks in advance.</p>