title: Flex mx style management performance
body: <p>I have a problem performance issue with Flex MX StyleManager.
  I am implementing theme support and I run the setStyleDeclaration for about 340 different styles</p>
  
  <pre><code>    for ( var i:int =1 ; i&lt;whiteStyles.lenght; i++ )
      { 
  
  view.styleManager.setStyleDeclaration(whiteStyles[i], view.styleManager.getStyleDeclaration(String(whiteStyles[i]).substr(String(whiteStyles[i]).lastIndexOf(".")) +"_blue"), false)
  
        }
  
      view.styleManager.setStyleDeclaration(whiteStyles[0], view.styleManager.getStyleDeclaration(whiteStyles[0]+"_blue"), true)
  </code></pre>
  
  <p>It take about 2 seconds for the UI update the first time I call the function as I call the function the time it takes to apply grows reaching 30+ second. I tried clearing the styles before but it dose not work. 
  Any tips on how to improve this?</p>