Hi Bob,

my first test showed, that

1. the performance of the RPC Call improved for less than 30.000 of my
test objects.
2. the performance of the RPC Call was worse for more than 30.000 of
my test objects.
3. when transfering lots of data, the "old" RPC mechanism leads to
the well known "slow java script warning" in IE, which is not anymore
the case with the new
mechanism.

I tested Internet Explorer 8 on a Macbook pro 3Ghz.

In my example I transfered a list of serializable object (source code
of the objects, see below)

Old mechanism:
Call took 15 ms for 0 Objects
Call took 204 ms for 5000 Objects
Call took 437 ms for 10000 Objects
Call took 624 ms for 15000 Objects
Call took 812 ms for 20000 Objects
Call took 1076 ms for 25000 Objects
Call took 1249 ms for 30000 Objects
Call took 1515 ms for 35000 Objects
Call took 1748 ms for 40000 Objects
Call took 2000 ms for 45000 Objects
Call took 2185 ms for 50000 Objects
Call took 2456 ms for 55000 Objects
Call took 2716 ms for 60000 Objects
Call took 3058 ms for 65000 Objects
Skript Warning

New Mechanism
Call took 15 ms for 0 Objects
Call took 95 ms for 5000 Objects
Call took 249 ms for 10000 Objects
Call took 390 ms for 15000 Objects
Call took 671 ms for 20000 Objects
Call took 968 ms for 25000 Objects
Call took 1279 ms for 30000 Objects
Call took 1608 ms for 35000 Objects
Call took 2069 ms for 40000 Objects
Call took 2544 ms for 45000 Objects
Call took 3090 ms for 50000 Objects
Call took 3745 ms for 55000 Objects
Call took 4525 ms for 60000 Objects
Call took 5117 ms for 65000 Objects
Call took 6132 ms for 70000 Objects
Call took 6772 ms for 75000 Objects
Call took 8191 ms for 80000 Objects
Call took 8846 ms for 85000 Objects
Call took 9871 ms for 90000 Objects
Call took 11888 ms for 95000 Objects
Call took 12247 ms for 100000 Objects

Do you have an assumption for the non linear performance?

Regards,
Mark

===== example source code for transfered objects (not complete) =====

public class SQLStringValue extends SQLFieldValue implements
Serializable {
        private static final long serialVersionUID = -7208567545126057591L;
        String i;

        public SQLStringValue() {
        }

        public SQLStringValue(String i) throws SQLFieldValueException
        {
                if (i == null)
                        throw new SQLFieldValueException("String parameter 
cannot be
null");
                this.i = i;
        }
        public SQLStringValue(SQLStringValue value)
        {
                this.i = value.i;
        }
        @Override
        public String getStringValue()
        {
                return ""+i;
        }
        @Override
        public boolean getBooleanValue()
        {
                return SQLBooleanValue.convert(i);
        }
        @Override
        public boolean isNull()
        {
                return false;
        }
        public SQLStringValue clone() {

                return new SQLStringValue(this);
        }
        @Override
        public SQLColumnInfo.ColumnTypes getType()
        {
                return SQLColumnInfo.ColumnTypes.stringType;
        }
        @Override
        public Object getObject()
        {
                return i;
        }

        @Override
    public int hashCode() {
            final int prime = 31;
            int result = super.hashCode();
            result = prime * result + ((i == null) ? 0 : i.hashCode());
            return result;
    }

        @Override
    public boolean equals(Object obj) {
            if (this == obj)
                    return true;
            if (!super.equals(obj))
                    return false;
            if (getClass() != obj.getClass())
                    return false;
            SQLStringValue other = (SQLStringValue) obj;
            if (i == null) {
                    if (other.i != null)
                            return false;
            } else if (!i.equals(other.i))
                    return false;
            return true;
    }
}

public class SQLFieldValue implements Serializable, Cloneable {
        private static final long serialVersionUID = 3042603979355146072L;
        public static SQLFieldValue getInstance(Object object) throws
SQLFieldValueException
        {
                if (object == null)
                        return new SQLFieldValue();
                if (object instanceof String)
                        return new SQLStringValue((String)object);
                throw new SQLFieldValueException("Unrecognized type " +
object.getClass().getName());
        }
        public SQLFieldValue()
        {
        }

        public SQLFieldValue clone() {
                return new SQLFieldValue();
        }

        public SQLColumnInfo.ColumnTypes getType()
        {
                return SQLColumnInfo.ColumnTypes.unknownType;
        }
        public int getIntValue()
        {
                return 0;
        }
        public long getLongValue()
        {
                return 0;
        }
        public String getStringValue()
        {
                return "";
        }
        public Date getDateValue()
        {
                return null;
        }
        public float getFloatValue()
        {
                return 0;
        }
        public double getDoubleValue()
        {
                return 0;
        }
        public boolean getBooleanValue()
        {
                return false;
        }
        public boolean isNull()
        {
                return true;
        }
        public String toString()
        {
                return getStringValue();
        }
        public Object getObject()
        {
                return null;
        }
        @Override
        public boolean equals(Object obj)
        {
                if (obj == null)
                        return false;
            if (this == obj)
                    return true;
            if (getClass() != obj.getClass())
                    return false;
            return true;
        }
        @Override
        public int hashCode()
        {
                return 3042603;
        }
}

==== Server Side generation of Objects ====

List<Serializable> result = new ArrayList<Serializable>();
                try {
                        for (int i=0; i < nr; i++) {
                                ReportCellValue v = new ReportCellValue();
                                SQLStringValue s = new SQLStringValue("abc"+i);
                                v.setValue(s);
                                result.add(v);
                        }
                } catch (Exception ex) {
                        ex.printStackTrace();
                }
                log.error("END");

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to