4 Replies Latest reply on Jul 2, 2011 10:53 AM by Farhan_._Khan

    Returning ArrayList from Java is very slow


      Thanks for reading the message.


      I am using the following:
      - Flex Builder 4.0
      - WebORB for Java


      A  remote object method is invoked and it returns an ArrayList from Java.  The data being responded is correct. The PROBLEM is that it takes ages  to deserialize the response. How can I optimize it ?


      what is the size of ArrayList instance?
      ==> About 100


      how long it takes?
      ==>  About 2 minutes. I was using BlazeDS and it was very fast. As we  switched to "WebORB for Java" and it is taking a long time.


      I'm  binding an ArrayCollection to mx:Tree and it is working perfectly fine !  For this purpose, the data is being fetched from the Java server side.  Our Flex calls a remote object which does the job. The Java method  returns an ArrayList of Object. You can also call it an ArrayList of  ArrayList because I have a parent child hierarchy. I have a Java class  similar to the following:


      public class Person {


      private String name;
      private String address;
      private ArrayList children; // arraylist of person


      // getters and setters ...




      The java remote object that is being called is something like this
      public ArrayList getPersonList() {
      return composePersonArrayList(); // this method returns Person arrayList after fetching from DB


      // on the flex side the remoteResultHandler receives the result as
      var arrCol:ArrayCollection = new ArrayCollection(event.result as Array);
      myTree.dataprovider = arrCol;


      Am I doing something wrong ? Please advise


      Thanks again
      Farhan Khan