This may be a step in the right direction; but I can't guarantee a solution. I suggest you start by re-writing your itemRenderer not to use binding. I've solved a lot of memory leaks for paying clients by teaching them that. Binding is also known to be a performance heavy operation in itemRenderers; so I would recommend that it get removed from the operation.
Instead of using Binding in an itemRenderer, I prefer to respond to the dataChange method.
I also recommend that you remove the HBox from your itemRenderer; as you should be able to use the label as is:
<mx:ComboBox width="200"
dataProvider="{dataProvider}">
<mx:itemRenderer>
<mx:Component>
<mx:Label dataChange="onDataChange(event)">
<mx:Script>
protected function onDataChange(event:Event):void{
this.text='item renderer' + data.label;
}
</mx:Script>
</mx:Label>
</mx:Component>
</mx:itemRenderer>
</mx:ComboBox>
I'm not sure if that will address any performance issues. There are a lot of oddities w/ the Flex ComboBox that I've had to work through while creating the Flextras AutoComplete.
Memory tells me that in Flex 3.4 (and before) every time the drop down was closed; it was destroyed--essentially not cached in memory. This changed in Flex 3.5 whereas they started caching it and re-using the same drop down object. I wonder if your perceived performance issues are related to that somehow.
Edit 1:
Based on complaints about this post not addressing the underlying issue; I put together this test case based on the original posters code and my suggested changes. My suggested changes do indeed solve the issue the original poster was having. Here is the source behind the sample:
[Bindable]
public var dataProvider:ArrayCollection = new ArrayCollection(
[{label:"test1"},
{label:"test2"},
{label:"test3"}]);
]]></mx:Script>
<!-- combobox with item renderer, this has a delay when opening -->
<mx:VBox>
<!-- ComboBox provided by original poster -->
<mx:ComboBox width="200"
dataProvider="{dataProvider}">
<mx:itemRenderer>
<mx:Component>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Label text="'item renderer' + {data.label}"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:ComboBox>
<!-- ComboBox with rewritten itemRenderer; which does not exhibit the problem -->
<mx:ComboBox width="200"
dataProvider="{dataProvider}">
<mx:itemRenderer>
<mx:Component>
<mx:Label dataChange="label1_dataChangeHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function label1_dataChangeHandler(event:FlexEvent):void
{
this.text = "item renderer" + data.label;
}
]]>
</mx:Script>
</mx:Label>
</mx:Component>
</mx:itemRenderer>
</mx:ComboBox>
<!-- default combobox, this works fine -->
<mx:ComboBox width="200"
dataProvider="{dataProvider}"/>
</mx:VBox>
Edit 2:
devshorts says my code does not work if we create the component as a stand alone itemRenderer; however I don't understand why not.
Here is the code for the stand alone itemRenderer, named com.flextras.listRenderers.CustomLabelRenderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml" dataChange="label1_dataChangeHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function label1_dataChangeHandler(event:FlexEvent):void
{
this.text = "item renderer" + data.label;
}
]]>
</mx:Script>
</mx:Label>
And here is some code to add to the mail application above to test it:
<!-- ComboBox, like above with the itemRenderer as a separate component -->
<mx:ComboBox width="200"
dataProvider="{dataProvider}" itemRenderer="com.flextras.listRenderers.CustomLabelRenderer" />
I updated the application at my provided link to include this new ComboBox instance; it is now the 3rd on the list.