Hi,

In a few words, I've got a problem with big object deserialization after an
RPC call.
On Internet Explorer, the browser ask me to interrupt the script because the
deserialization process is too long.

In fact, my RPC service returns a deep recursive tree, and some other data,
where the Item is called Option :

The generated FieldSerializer looks like :

public static void
deserialize(com.google.gwt.user.client.rpc.SerializationStreamReader
streamReader, Option instance) throws
com.google.gwt.user.client.rpc.SerializationException{
    //The childs of this Option node, defining the tree
  *  setChildren(instance, (java.util.List) streamReader.readObject());*
 *   //Some other atomic data
    (...)*

  }

In my mind, the invocation of setChildren() involves that the childs Options
are deserialized too. And, because of my tree is too deep, this
deserialization process leeds to have a "Would you like to interrupt the
script ?" in IE6/7.

I think I could resolve this problem by adding a deferred command in this
process :

public static void
deserialize(com.google.gwt.user.client.rpc.SerializationStreamReader
streamReader, Option instance) throws
com.google.gwt.user.client.rpc.SerializationException{
    //The childs of this Option node, defining the tree
    Command c = new Command(){
  *      public void execute(){
           setChildren(instance, (java.util.List)
streamReader.readObject());*
        }
    }
    DeferredCommand.addPause();
    DeferredCommand.addCommand(c);
 *   //Some other atomic data
    (...)*

  }

But, to do that, I have to modify the generator of this serializer, and i've
not found where I can do that. So my questions are :

   - Is it a good idea ?
   - How can I modify /implement my own serializer generator for this tree ?


P.S. : Furthermore, I will have to deal with asynchronism because of my
deserialize method will returns before my tree will be totaly deserialized ;
but I will work on this in a second step.

Thank you.

-- 
Damien Picard
Axeiya Services : http://axeiya.com/
gwt-ckeditor : http://code.google.com/p/gwt-ckeditor/
Mon livre sur GWT : http://axeiya.com/index.php/ouvrage-gwt.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to