This blog introduces how to diagnose Agile PLM related issues.

  • May 23, 2013

Poorer performance of IQuery in than

Jie Chen
Senior Principal Technical Support Engineer

Recently we got several customers' report that the IQuery API in client SDK program has poorer performance in Agile than If to monitor SDK client program's memory heap usage we will see much more heap is used in and Wireshark monitor shows more data packages are received from Agile Server. This article will bring us close to the essence of the problem and see the different behavior between and

First we have a very simple IQuery sample code to get all active users from Agile. After the IQuery finished, we call Thread.sleep(1000000) to pause the program, then take the heap dump.

    public static ArrayList getUsersData(IAgileSession agileSession) throws Exception {
ArrayList result = null;
try {
String query = "SELECT [General Info.User ID], ";
query += " [General Info.First Name], ";
query += " [General Info.Last Name], ";
query += " [General Info.Business Phone], ";
query += " [General Info.Status], ";
query += " [General Info.Email], ";
query += " [General Info.LOB], ";
query += " [General Info.BU], ";
query += " [General Info.Division], ";
query += " [General Info.Department], ";
query += " [General Info.Title], ";
query += " [General Info.Address], ";
query += " [General Info.Mobile Phone], ";
query += " [General Info.Role], ";
query += " [General Info.Region], ";
query += " [General Info.Country], ";
query += " [Detail Information.User Group] , ";
query += " [Detail Information.RO User], ";
query += " [Detail Information.Brand], ";
query += " [Detail Information.NS], ";
query += " [Detail Information.LOCATED RO], ";
query += " [Detail Information.LOCATED NS], ";
query += " [Detail Information.Business Group] ";
query += "FROM [User] ";
query += "WHERE [General Info.Status] == 'Active' ";
IQuery iQuery = (IQuery) agileSession.createObject(IQuery.OBJECT_TYPE, query);
ITable table = iQuery.execute();
ITwoWayIterator it = table.getTableIterator();
result = new ArrayList();
int i=0;
while (it.hasNext()) {
IRow row = (IRow) it.next();
Map map = row.getValues();
System.out.println(i++ +" : " +map);
if(i == 1000 ) break;
} catch (APIException e) {
throw e;
return result;

In above code, we fill result (ArrayList) with 1000 objects, it is for diagnosis only.

Now we have two Heap Dump files, one for and the rest one for

In, we have 1000 objects in ArrayList, they consumes 5,770,544 bytes, while consumes 206,871,844 bytes.



array of [Ljava/lang/Object;
Number of children

Number of parents

Owner address

Owner object


Total size

Leak suspect

Responsible for 206,871,844 bytes (93.252 %) of Java heap


array of [Ljava/lang/Object;
Number of children

Number of parents

Owner address

Owner object


Total size


Definitely, each object in consumes more memory than Let's capture one attribute [General Info.Department] to analyze. "Department" is a List type, of course we do not care it is common List or Cascade List. Compare this attribute between two version we will see the big difference and confirm there is a big object (com/agile/api/pc/CascadeList) in which consumes 100, 199 bytes, consumes 248 bytes only.

Look more close to the big object (com/agile/api/pc/CascadeList) in, we should see com/agile/admin/client/value/AdminList, it takes 99, 947 bytes and contains 579 arrays of com/agile/admin/client/value/AdminListItem , actually AdminListItem represent one List entry object. From here we realize that in, if to return a List attribute value, Agile also will return the whole List's all entries value to the client. But will not.

So, that is the difference and you get it, right? Please contact Oracle Agile Support if you consider the performance impact to your business and system.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.