Performance issues when downloading a BOM using the java API
I'm currently using this Java code to get a BOM from Agile. It works, but it's slow, especially over an internet connection. Is there a better way to do this?
//This is a recursive method of a class
public static void GetBom(String PartNumber, String PartRevision, int level) {
try {
String itemNumber, itemRevision, Quantity, Description;
Iterator it;
IItem item;
ITable table;
item = (IItem)session.getObject(ItemConstants.CLASS_PART, PartNumber);
table = item.getTable(ItemConstants.TABLE_BOM);
it = table.iterator();
while (it.hasNext()) {
IRow row = (IRow)it.next();
itemNumber = (String)row.getValue(ItemConstants.ATT_BOM_ITEM_NUMBER);
itemRevision = (String)row.getValue(ItemConstants.ATT_BOM_ITEM_REV);