I do not know how to explain it. But I'll try .. Fest slows down to crawl while working with JXTreeTable from swingx. At first it does not slow down. It works fine for a while, but after a while, when the same actions are repeated, it slows down a lot.
I raised an error for this on github. Please tell me if this is what I am doing wrong. I can not reproduce the problem when I tried to create SSCCE.
In any case, here the video slows him down.
http://screencast.com/t/liNttCw2In0w
From 0.39 to 0.40, many operations are performed. They are executed when there is one line in JXTreeTable.
At the point in time from 0.49 to the end of the recording, the same operation is repeated, but the table now has three rows, the mouse takes a lot of time.
I attached a screenshot taken at a time when the holiday is slowing down, which is trying to explain it more

This is the code that does this work:
Step 1) Selecting a node from the tree is as follows:
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) Search and select a row from 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"); }
Step 3) Display a popup menu and press a line
table.showPopupMenuAt(TableCell.row(selectRow).column(0)).menuItem("btnTransfer").click();
I'm not sure why its slowing down. Please let me know if there is more information I can help with. I would appreciate help in solving the problem.
I profiled the application and I did not find anything unpleasant. I do not have much experience profiling applications. I would appreciate it if someone could look at it a second time. I profiled it with yourkit and uploaded a snapshot dump here:
https://www.dropbox.com/s/dh976v01q9c3sgj/ImportShareholderData.shouldTransferAndSplit-2013-06-14-shutdown.snapshot.zip
Any help would be greatly appreciated.
EDIT:
I think I forgot to mention the same thing when I do it manually. It only slows down the holiday. Does it make me believe there is a problem with the festival?
Excuse me.
EDIT 2: As a request to Marcin (sorry for delaying Marcin). Here is the code when the first line gets split
public List<Integer> splitRowEqually(ShareType shareType, String date, int folioNo, int certNo, int... certnos) throws NoSuchFieldException, TorqueException { //select a tree node selectFolioInTree(shareType, folioNo); Pause.pause(new Condition("Wait until tab is created") { @Override public boolean test() { return importShareholders.tabbedPane().tabTitles().length>0; } }); //select a row on the table to split int row=selectRowWithCertNunber(certNo); List<Integer> rowsIndexes=new ArrayList<Integer>(); JTableFixture table = importShareholders.table(); //show popup menu on that row and select split table.showPopupMenuAt(row(row).column(columnIndex(TRANS_TYPE))).menuItem("btnSplit").click(); DialogFixture splitDialog=FinderUtilities.getDialogWithTitle("Split Share Certificate"); splitDialog.textBox("tfDateOfSplit").setText(date); int noOfShares= Integer.parseInt(table.cell(row(row).column(columnIndex(NO_OF_SHARES))).value()); int distFrom= Integer.parseInt(table.cell(row(row).column(columnIndex(DIST_NO_FROM))).value()); int distTo= Integer.parseInt(table.cell(row(row).column(columnIndex(DIST_NO_TO))).value()); //split the row into the number of times decided by the certnos array int noOfSharesInEachSplit=noOfShares/certnos.length; for(int i=0;i<certnos.length;i++){ int distToInSplit = distFrom + noOfSharesInEachSplit-1; enterSplitRowDetails(splitDialog, certnos[i], distFrom, distToInSplit<=distTo ? distToInSplit : distTo); distFrom=distToInSplit+1; rowsIndexes.add(row++); } splitDialog.button("btnSplit").click(); return rowsIndexes; } //selects a node from the left hand side tree public void selectFolioInTree(final ShareType shareType,final int folioNo) throws TorqueException { JTreeFixture folioTreeFixture = importShareholders.panel("treePanel").tree("folioTree"); folioTreeFixture.separator("~"); // I use these wrapper classes - StringWrapper and FolioTreeRep, so that I can get a html // string for the tree node like <html><b>Shareholder</b></html> String treePath = new StringWrapper("Shareholders", true) + "~" + (ShareType.isEquity(shareType) ? new StringWrapper("Equity Folios", true) : new StringWrapper("Preference Folios", true)) + "~" + new FolioTreeRep(mapOfFolioNames.get(folioNo), folioNo, shareType).toString(); folioTreeFixture.clickPath(treePath); } //search the table for a row that contains the cert no provided in the Certificate Number column. private int selectRowWithCertNunber(int certNo) throws NoSuchFieldException { int selectRow=-1; JTableFixture table=importShareholders.table("historyTable"); for(int i=0;i<table.rowCount();i++){ String certificateNumber = table.cell(row(i).column(columnIndex(CERT_NO))).value(); String remarks=table.cell(row(i).column(columnIndex(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; } // enter details on the table in the SplitDialog private void enterSplitRowDetails(DialogFixture splitDialog, int cert, int distFrom, int distTo) { splitDialog.button("btnAdd").click(); int row = splitDialog.table().rowCount(); splitDialog.table().enterValue(row(row - 1).column(0), String.valueOf(cert)); splitDialog.table().enterValue(row(row - 1).column(1), String.valueOf(distFrom)); splitDialog.table().enterValue(row(row - 1).column(2), String.valueOf(distTo)); }