Forum Discussion

DKNP's avatar
DKNP
Occasional Contributor
8 years ago

Java Swing Controls (ComboBox) noticeable performance drop off

Hi

 

I have come an interesting problem when running tests against an application made up of java swing controls.

 

The application has a primary window and in some cases where functionality is called a secondary dialog (at the same level as the primary window in the object browser) is made visible

 

What I am noting is that should I interact with a ComboBox in the secondary window (even with 100+ items) it populates in almost instantly. When i interact with the same base control (JComboBox) on the main window it can take anything up to 20 seconds to select the item.

 

I at first thought it was related to the lookup method (FindChildEx) for the specific control I was using and the depth of the control within the structure, but I have now dis-proven that, even though there is a minor delay.

 

I have put timers in my code to determine where the main delay is occurring and it is at the ClickItem stage. Having scoured the forum I found a thread that explained about the dropdown component and its population possibly being responsible.

 

Having put code in place to click, locate and select an item from the ComboBox.list component, I still notice a significant delay in selecting the item (even when the dropdown list only contains 3 items)

 

Has anyone else noticed any similar issues and found a working solution?

 

1 Reply

  • JuliaBernikova's avatar
    JuliaBernikova
    SmartBear Alumni (Retired)

    Hi,

     

    It looks like the problem is related to the specifics of Java. The thing is that the drop-down list of Java Swing ComboBox is not bound to this combo box. It is an individual object which may appear at any hierarchy level. So, TestComplete has to look through the entire app structure to find this drop-down list which takes much time if there are lots of objects in the app.

     

    A while ago, our R&D team created a patch which might fix this issue. So, you can contact the support team and ask for the patch (patch CC-9179). Or, you can wait for the upcoming version of TestComplete - 12.30 - as it contains many performance improvements which might resolve the issue as well.