Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fest slows down while testing with swingx jxtreetable #20

Open
Sethuraman opened this issue Jun 13, 2013 · 0 comments
Open

Fest slows down while testing with swingx jxtreetable #20

Sethuraman opened this issue Jun 13, 2013 · 0 comments

Comments

@Sethuraman
Copy link

I am not sure how to explain this. But I'll try.. Fest slows down to crawl while working with JXTreeTable of swingx. It doesn't slow down initially. It works fine for a while, but after a while when the same actions are repeated it slows down badly.

Here's a video of it slowing down.

http://screencast.com/t/liNttCw2In0w

At times 0.39s to 0.40 a set of operations are performed. These are done when there is one row in the JXTreeTable.

At time 0.49 to end of recording the same operation is repeated but there are now 3 rows in the table, it takes very long for the mouse to click.

I have attached a screenshot taken at the time when fest slows down, which attempts to explain it more

screenshot_13_06_13_10_39_pm

This is the code that does the work:

Step 1) Selecting a node from the tree is done as below:

 JTreeFixture folioTreeFixture = importShareholders.panel("treePanel").tree("folioTree");

        folioTreeFixture.separator("~");
        folioTreeFixture.selectPath(new StringWrapper("Shareholders", true)+"~"+
             (ShareType.isEquity(shareType) ? new StringWrapper("Equity Folios", true) : new StringWrapper("Preference Folios", true))+"~"+
                new FolioTreeRep(folio.getName(),folioNo, shareType).toString());

Step 2) Searching and selecting a row from the JXTreeTable

int selectRow=-1;
        JTableFixture table=importShareholders.table("historyTable");
        for(int i=0;i<table.rowCount();i++){
            String certificateNumber = table.cell(TableCell.row(i).column(ShareholderHistoryTable.columnIndex(ShareholderHistoryTable.CERT_NO))).value();
            String remarks=table.cell(TableCell.row(i).column(ShareholderHistoryTable.columnIndex(ShareholderHistoryTable.REMARKS))).value();
            if(StringUtils.isEmpty(remarks) && StringUtils.isNotEmpty(certificateNumber) && Integer.parseInt(certificateNumber)==certNo){
                selectRow=i;
                break;
            }
        }
        if(selectRow==-1){
            fail("Couldn't find certificate number to transfer");
        }
        return selectRow;

Step 3) Showing the pop up menu and clicking the row

table.showPopupMenuAt(TableCell.row(selectRow).column(0)).menuItem("btnTransfer").click();

I am not sure why its slowing down. Please let me know if there is any more info I can help with. Would be grateful for some help in solving the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant