Model Design Problem with Editors

2011-03-22 Thread keyvez
I have two classes

class Person {
  Long id;
  String name;
}

and 

class Car {
  Long id;
  Long person;
  String model;
}

I want to map these to gwt car editors. Can I just have an editor like:

CarEditor implements Editor {
  PersonNameEditor person;
  Label model;
}

or should I have to change my model like so:

class Car {
  Long id;
  Person person;
  String model;
}

Thanks for your help.

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



Re: EntityProxy Returns Null for Collection Properties

2011-03-12 Thread keyvez
There is a problem with the above method that I described, I am seeing 
collections of a single element being returned when that collection is 
empty. And the single element is null. I still cannot get .with to populate 
the collections in my entityproxy.

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



Re: GWT Validator with Editor Framework

2011-03-11 Thread keyvez
Hi,

I just found the DynaTableRf sample and see that onViolation is fired there. 
Going through its setup I realized that I was missing the 
hibernate-validator jar, so I put it in my libs and build path, but still no 
entity property violations are caught. Any help is greatly appreciated.

Thank you,
Gaurav

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



GWT Validator with Editor Framework

2011-03-10 Thread keyvez
Hi,

I am unable to validate entities using the editor framework. No matter what 
I do the errors are never thrown from client side or server side.

Here is a code snippet:

--
   
public class P {

 public P() {

}


 @Size(min=4)

private String name;

 public void setName(String name) {

 this.name = name;

}


 public String getName() {

 return name;

}



 }

-

// PEditor
   
public class PEditor extends Composite implements Editor {


 private static PEditorUiBinder uiBinder = GWT.create(PEditorUiBinder.class
);


 interface PEditorUiBinder extends UiBinder {

}

 @UiField

TextBox name;


 public PEditor() {

 initWidget(uiBinder.createAndBindUi(this));

}


}

---

   PEditor pEditor;

 interface Driver extends SimpleBeanEditorDriver {}

 Driver driver = GWT. create(Driver.class);

 public void onModuleLoad() {

  pEditor = new PEditor();

  driver.initialize(pEditor);

  P p = new P();

  driver.edit(p);

  pEditor.name.setText("G");

  driver.flush();

  if(driver.hasErrors()) {

 List errors = driver.getErrors();

 for (EditorError error : errors) {

  System.out.println(error.getMessage());

 }

 }

  }


--


Thanks for your help

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



Help with Generic DAO

2011-02-24 Thread keyvez
Hi,

I am trying to build a generic DAO (BaseEntity) as mentioned 
in 
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#locators,
 
so I don't have to duplicate basic CRUD methods for Entities. Is there an 
example or code sample?

Thanks,
Gaurav

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



Re: Application loads with blank page on Firefox 4 beta 6

2010-11-19 Thread keyvez
I have also filed an issue with GWT on this.
http://code.google.com/p/google-web-toolkit/issues/detail?id=5606

I hope I am not the only one with the issue.

On Nov 17, 11:21 pm, keyvez  wrote:
> Hi,
>
> I think this might be a bug in the new gwt 2.1 sdk. When I create a
> new web application project in eclipse and compile and run it in web
> mode on FF4 beta 6, I see a blank page.
>
> On debugging in firebug, the following errors was thrown:
>
> reference to undefined property m.external.gwtOnLoad
> reference to undefined property document.documentMode
>
> Please help.
>
> Thanks,

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



Re: Application loads with blank page on Firefox 4 beta 6

2010-11-19 Thread keyvez
Isn't anyone else experiencing this. Please help, this is becoming an
issue on windows as well, a user is reporting it on ff windows too.

You help is really appreciated.
Gaurav

On Nov 17, 11:21 pm, keyvez  wrote:
> Hi,
>
> I think this might be a bug in the new gwt 2.1 sdk. When I create a
> new web application project in eclipse and compile and run it in web
> mode on FF4 beta 6, I see a blank page.
>
> On debugging in firebug, the following errors was thrown:
>
> reference to undefined property m.external.gwtOnLoad
> reference to undefined property document.documentMode
>
> Please help.
>
> Thanks,

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



Application loads with blank page on Firefox 4 beta 6

2010-11-17 Thread keyvez
Hi,

I think this might be a bug in the new gwt 2.1 sdk. When I create a
new web application project in eclipse and compile and run it in web
mode on FF4 beta 6, I see a blank page.

On debugging in firebug, the following errors was thrown:

reference to undefined property m.external.gwtOnLoad
reference to undefined property document.documentMode


Please help.

Thanks,

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



Re: EntityProxy Returns Null for Collection Properties

2010-10-19 Thread keyvez
Here's a workaround, if you have collections in your entity then
before returning the collection from a data access method like findAll
or something, just access each collection property somehow.

For eg.

List users = Query.execute().getReturnList();
for(User user : users) user.getAddresses().size();
return users;

That should ensure that the collection properties are included in the
proxy object that is returned.

I think it's some kinda optimization on JPA's part to reduce lookups
until they are needed. Heh, lazy!

Cheers and thanks for everyone's help.

Gaurav
On Oct 19, 1:29 pm, keyvez  wrote:
> I will try to write a small app from scratch which tries this feature
> so I can be sure that I am doing it the right way.
>
> On Oct 19, 9:40 am, keyvez  wrote:
>
>
>
> > Hi,
>
> > Thanks for the suggestions, my addresses are a set of strings so I
> > tried calling like so:
>
> > Request createReq =
> > request.authenticate().using(user).with("addresses");
>
> > createReq.fire(new Receiver() {
>
> >             @Override
> >             public void onSuccess( UserProxy authenticatedUser ) {
>
> > System.out.println(authenticatedUser.getFirstname()); //
> > prints "First name of Person" as expected
>
> > System.out.println(authenticatedUser.getAddresses().size()); //
> > prints
> > 0 instead of the no. of addresses, which is more than 0 for this user
> >             }
>
> > }
>
> > But it's the same result as before, maybe I am missing another piece
> > of the equation. Thanks for your help.
>
> > Gaurav
>
> > On Oct 19, 6:18 am, Thomas Broyer  wrote:
>
> > > On 19 oct, 14:47, agi  wrote:
>
> > > > Does it work recurential?
> > > > so lets say I have  classes:
> > > > Person
> > > > {
> > > >   List adresses;
>
> > > > }
>
> > > > Address
> > > > {
> > > >      Telephone telephone;
>
> > > > }
>
> > > > I should write
> > > > personRequest.findAll().with("adresses", "telephone").fire(...)
> > > > ?
>
> > > with("adresses.telephone")

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



Re: EntityProxy Returns Null for Collection Properties

2010-10-19 Thread keyvez
I will try to write a small app from scratch which tries this feature
so I can be sure that I am doing it the right way.

On Oct 19, 9:40 am, keyvez  wrote:
> Hi,
>
> Thanks for the suggestions, my addresses are a set of strings so I
> tried calling like so:
>
> Request createReq =
> request.authenticate().using(user).with("addresses");
>
> createReq.fire(new Receiver() {
>
>             @Override
>             public void onSuccess( UserProxy authenticatedUser ) {
>
> System.out.println(authenticatedUser.getFirstname()); //
> prints "First name of Person" as expected
>
> System.out.println(authenticatedUser.getAddresses().size()); //
> prints
> 0 instead of the no. of addresses, which is more than 0 for this user
>             }
>
> }
>
> But it's the same result as before, maybe I am missing another piece
> of the equation. Thanks for your help.
>
> Gaurav
>
> On Oct 19, 6:18 am, Thomas Broyer  wrote:
>
>
>
>
>
>
>
> > On 19 oct, 14:47, agi  wrote:
>
> > > Does it work recurential?
> > > so lets say I have  classes:
> > > Person
> > > {
> > >   List adresses;
>
> > > }
>
> > > Address
> > > {
> > >      Telephone telephone;
>
> > > }
>
> > > I should write
> > > personRequest.findAll().with("adresses", "telephone").fire(...)
> > > ?
>
> > with("adresses.telephone")

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



Re: EntityProxy Returns Null for Collection Properties

2010-10-19 Thread keyvez
Hi,

Thanks for the suggestions, my addresses are a set of strings so I
tried calling like so:

Request createReq =
request.authenticate().using(user).with("addresses");

createReq.fire(new Receiver() {

@Override
public void onSuccess( UserProxy authenticatedUser ) {
 
System.out.println(authenticatedUser.getFirstname()); //
prints "First name of Person" as expected
 
System.out.println(authenticatedUser.getAddresses().size()); //
prints
0 instead of the no. of addresses, which is more than 0 for this user
}
}

But it's the same result as before, maybe I am missing another piece
of the equation. Thanks for your help.

Gaurav

On Oct 19, 6:18 am, Thomas Broyer  wrote:
> On 19 oct, 14:47, agi  wrote:
>
>
>
>
>
> > Does it work recurential?
> > so lets say I have  classes:
> > Person
> > {
> >   List adresses;
>
> > }
>
> > Address
> > {
> >      Telephone telephone;
>
> > }
>
> > I should write
> > personRequest.findAll().with("adresses", "telephone").fire(...)
> > ?
>
> with("adresses.telephone")

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



Re: EntityProxy Returns Null for Collection Properties

2010-10-19 Thread keyvez
I also tried List addresses instead of Set addresses
but it still returns an empty list despite the datastore having values
in the addresses field for that user.

On Oct 19, 12:56 am, keyvez  wrote:
> My EntityProxy looks like this
>
> @ProxyFor ( User.class )
> public interface UserProxy extends EntityProxy {
>
>     Long getId();
>
>     String getFirstname();
>
>     String getLastname();
>
>     Set getAddresses();
>
>     void setAddresses( Set addresses );
>
> }
>
> And my Entity class look like this:
>
> @Entity
> public class User {
>
>     @Id
>     @GeneratedValue ( strategy = GenerationType.IDENTITY )
>     private Long id;
>
>     @NotNull
>     private String firstname;
>
>     @NotNull
>     private String lastname;
>
>     private Set addresses;
>
>     public void setAddresses( Set addresses ) {
>
>         this.addresses = addresses;
>     }
>
>     public Set getAddresses() {
>
>         if ( addresses == null ) {
>             addresses = new HashSet();
>         }
>         return addresses;
>     }
>
> }
>
> When I make a request using RequestFactory like so:
>
> Request createReq = request.authenticate().using(user);
>
> createReq.fire(new Receiver() {
>
>     @Override
>     public void onSuccess( UserProxy authenticatedUser ) {
>
>         System.out.println(authenticatedUser.getFirstname()); //
> prints "First name of Person" as expected
>
> System.out.println(authenticatedUser.getAddresses().size()); // prints
> 0 instead of the no. of addresses, which is more than 0 for this user
>
>     }
>
> });
>
> I am using JPA on app engine.
>
> It look like RequestFactoryServlet is not able to properly serialize
> collection properties of datastore objects. Any help in this regard
> would be greatly appreciated.
>
> Thanks,
> Gaurav

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



EntityProxy Returns Null for Collection Properties

2010-10-19 Thread keyvez
My EntityProxy looks like this

@ProxyFor ( User.class )
public interface UserProxy extends EntityProxy {

Long getId();

String getFirstname();

String getLastname();

Set getAddresses();

void setAddresses( Set addresses );
}

And my Entity class look like this:

@Entity
public class User {

@Id
@GeneratedValue ( strategy = GenerationType.IDENTITY )
private Long id;

@NotNull
private String firstname;

@NotNull
private String lastname;

private Set addresses;

public void setAddresses( Set addresses ) {

this.addresses = addresses;
}

public Set getAddresses() {

if ( addresses == null ) {
addresses = new HashSet();
}
return addresses;
}

}

When I make a request using RequestFactory like so:

Request createReq = request.authenticate().using(user);

createReq.fire(new Receiver() {

@Override
public void onSuccess( UserProxy authenticatedUser ) {

System.out.println(authenticatedUser.getFirstname()); //
prints "First name of Person" as expected
 
System.out.println(authenticatedUser.getAddresses().size()); // prints
0 instead of the no. of addresses, which is more than 0 for this user

}
});

I am using JPA on app engine.

It look like RequestFactoryServlet is not able to properly serialize
collection properties of datastore objects. Any help in this regard
would be greatly appreciated.

Thanks,
Gaurav

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



Pass a Java Object between to Opener Window

2010-06-16 Thread keyvez
Hi,

I am trying to pass a custom Java object to the another window to
which I have a reference using $wnd.opener.

When I call $wnd.opener.callback(); or $wnd.opener.callback('string'),
it works, however, when I pass
$wnd.opener.callback(@com.package.Class::staticField), the staticField
is received as null by callback.

Here's my code:

Main Window:

-
public native void registerCallback() /*-{
$wnd.callback =
$entry(@com.application.web.client.Tv::javaCallback(Lcom/application/
web/model/User;));
}-*/;

public static void javaCallback( User registeredUser ) {

Window.alert(Boolean.toString(registeredUser == null));
Window.alert(user.getFirstname());

}
-
Child Window:
-
 Window.addWindowClosingHandler(new ClosingHandler() {

@Override
public native void onWindowClosing( ClosingEvent event ) /
*-{
   if($wnd.opener != null) {
alert('sending request');
var obj =
@com.application.web.authentication.OAuth::registeredUser;
$wnd.opener.callback(obj);
   }
}-*/;
  });
-

Any help is appreciated.

Thanks,

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



Re: Very slow DevMode on Mac Leopard with GWT 2.0 RC2

2009-12-07 Thread keyvez
I solved my problem. My DNS settings didn't have my routers DNS only
the two google's DNS servers I added a few days ago. So if you are
experiencing the same problem, try the following:

http://localhost:/index.html?gwt.codesvr=localhost:9997
http://localhost:/index.html?gwt.codesvr=127.0.0.1:9997

check /etc/hosts or DNS settings in System Preferences.

Good luck.
Gaurav

On Dec 6, 4:33 pm, keyvez  wrote:
> Hi,
>
> I am experiencing really slow times (30-40 seconds) when I refresh the
> page on safari or firefox. It almost seems to recompile the full app
> every single time I hit refresh. I don't even change anything, and
> this the app you get when you create new Web App in eclipse. Meanwhile
> the browser hangs like it's supposed to when making a synchronous
> server request.
>
> Specs: Eclipse 3.5, Mac OS 10.6, Java 6 64-bit (tried with 32-bit 5
> and 6), GWT 2.0 RC2 and GPE 1.2 RC2 (tried RC1 for both of those too.
>
> And running it with the -Dgwt=perflog=true VM argument I receive this:
>
> perf? OophmSessionHandler?.loadModule Main 838ms
>
> perf? ModuleDef?.refresh 35ms
> perf? ResourceOracleImpl?.refresh 1ms
> perf? ResourceOracleImpl?.refresh 23ms
> perf? ResourceOracleImpl?.refresh 9ms
> perf? TypeOracleMediator?.addNewUnits 165ms
> perf? ModuleSpace?.onLoad 511ms
> perf? Generator 'com.google.gwt.uibinder.rebind.UiBinderGenerator?'
> produced 'com.company.mypackage.web.client.Application.Binder' 21ms
> perf? TypeOracleMediator?.addNewUnits 0ms
> perf? Generator
> 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator?'
> produced
> 'com.company.mypackage.web.client.Application_BinderImpl_GenBundle?'
> 4ms
> perf? TypeOracleMediator?.addNewUnits 0ms
> perf? Generator 'com.google.gwt.i18n.rebind.LocaleInfoGenerator?'
> produced 'com.google.gwt.i18n.client.impl.LocaleInfoImpl?' 14ms
> perf? TypeOracleMediator?.addNewUnits 0ms
> perf? Generator 'com.google.gwt.i18n.rebind.LocalizableGenerator?'
> produced 'com.google.gwt.i18n.client.impl.CldrImpl?' 0ms
>
> Which doesn't tell me where the 30-40 seconds are being spent.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Gaurav
>
> On Dec 4, 12:45 am, jd  wrote:
>
>
>
> > Also, the slowdown for me seems to be across the board.
>
> > Right now my CPU is very high and the busy thread is doing this:
>
> > Daemon Thread [Code server for rooms from Mozilla/5.0 (Macintosh; U;
> > Intel Mac OS X 10.5; en-US; rv:1.9.0.15) Gecko/2009101600 Firefox/
> > 3.0.15 onhttp://localhost:/?gwt.codesvr=localhost:9997
> > @ :twjO<"N0ofi:u+0] (Suspended)
> >         Thread.currentThread() line: not available [native method]
> >         ThreadLocal.get() line: 124
> >         StringCoding.deref(ThreadLocal) line: 49
> >         StringCoding.encode(String, char[], int, int) line: 361
> >         String.getBytes(String) line: 812
> >         BrowserChannel.writeUtf8String(DataOutputStream, String) line: 1583
> >         BrowserChannel$InvokeOnClientMessage.send() line: 866
> >         BrowserChannelServer.invokeJavascript(CompilingClassLoader,
> > JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 164
> >         ModuleSpaceOOPHM.doInvoke(String, Object, Class[], Object[]) 
> > line:
> > 120
> >         ModuleSpaceOOPHM(ModuleSpace).invokeNative(String, Object, Class
> > [], Object[]) line: 507
> >         ModuleSpaceOOPHM(ModuleSpace).invokeNativeInt(String, Object, 
> > Class
> > [], Object[]) line: 240
> >         JavaScriptHost.invokeNativeInt(String, Object, Class[], Object[])
> > line: 75
> >         Element$.getPropertyInt$(Element, String) line: not available
> >         ResizableWidgetCollection.checkWidgetSize() line: 216
> >         ResizableWidgetCollection$1.run() line: 125
> >         ResizableWidgetCollection$1(Timer).fire() line: 141
> >         GeneratedMethodAccessor36.invoke(Object, Object[]) line: not
> > available
> >         DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> >         Method.invoke(Object, Object...) line: 592
> >         MethodAdaptor.invoke(Object, Object...) line: 103
> >         MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71
> >         OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, 
> > int,
> > BrowserChannel$Value[]) line: 157
> >         BrowserChannelServer
> > (BrowserChannel).reactToMessagesWhileWaitingForReturn(BrowserChannel
> > $SessionHandler) line: 1713
> >         BrowserChannelServer.invokeJavascript(CompilingClassLoader,
>

Re: Very slow DevMode on Mac Leopard with GWT 2.0 RC2

2009-12-06 Thread keyvez
Hi,

I am experiencing really slow times (30-40 seconds) when I refresh the
page on safari or firefox. It almost seems to recompile the full app
every single time I hit refresh. I don't even change anything, and
this the app you get when you create new Web App in eclipse. Meanwhile
the browser hangs like it's supposed to when making a synchronous
server request.

Specs: Eclipse 3.5, Mac OS 10.6, Java 6 64-bit (tried with 32-bit 5
and 6), GWT 2.0 RC2 and GPE 1.2 RC2 (tried RC1 for both of those too.

And running it with the -Dgwt=perflog=true VM argument I receive this:

perf? OophmSessionHandler?.loadModule Main 838ms

perf? ModuleDef?.refresh 35ms
perf? ResourceOracleImpl?.refresh 1ms
perf? ResourceOracleImpl?.refresh 23ms
perf? ResourceOracleImpl?.refresh 9ms
perf? TypeOracleMediator?.addNewUnits 165ms
perf? ModuleSpace?.onLoad 511ms
perf? Generator 'com.google.gwt.uibinder.rebind.UiBinderGenerator?'
produced 'com.company.mypackage.web.client.Application.Binder' 21ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator
'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator?'
produced
'com.company.mypackage.web.client.Application_BinderImpl_GenBundle?'
4ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator 'com.google.gwt.i18n.rebind.LocaleInfoGenerator?'
produced 'com.google.gwt.i18n.client.impl.LocaleInfoImpl?' 14ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator 'com.google.gwt.i18n.rebind.LocalizableGenerator?'
produced 'com.google.gwt.i18n.client.impl.CldrImpl?' 0ms

Which doesn't tell me where the 30-40 seconds are being spent.

Any help would be greatly appreciated.

Thanks,
Gaurav

On Dec 4, 12:45 am, jd  wrote:
> Also, the slowdown for me seems to be across the board.
>
> Right now my CPU is very high and the busy thread is doing this:
>
> Daemon Thread [Code server for rooms from Mozilla/5.0 (Macintosh; U;
> Intel Mac OS X 10.5; en-US; rv:1.9.0.15) Gecko/2009101600 Firefox/
> 3.0.15 onhttp://localhost:/?gwt.codesvr=localhost:9997
> @ :twjO<"N0ofi:u+0] (Suspended)
>         Thread.currentThread() line: not available [native method]
>         ThreadLocal.get() line: 124
>         StringCoding.deref(ThreadLocal) line: 49
>         StringCoding.encode(String, char[], int, int) line: 361
>         String.getBytes(String) line: 812
>         BrowserChannel.writeUtf8String(DataOutputStream, String) line: 1583
>         BrowserChannel$InvokeOnClientMessage.send() line: 866
>         BrowserChannelServer.invokeJavascript(CompilingClassLoader,
> JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 164
>         ModuleSpaceOOPHM.doInvoke(String, Object, Class[], Object[]) line:
> 120
>         ModuleSpaceOOPHM(ModuleSpace).invokeNative(String, Object, Class
> [], Object[]) line: 507
>         ModuleSpaceOOPHM(ModuleSpace).invokeNativeInt(String, Object, Class
> [], Object[]) line: 240
>         JavaScriptHost.invokeNativeInt(String, Object, Class[], Object[])
> line: 75
>         Element$.getPropertyInt$(Element, String) line: not available
>         ResizableWidgetCollection.checkWidgetSize() line: 216
>         ResizableWidgetCollection$1.run() line: 125
>         ResizableWidgetCollection$1(Timer).fire() line: 141
>         GeneratedMethodAccessor36.invoke(Object, Object[]) line: not
> available
>         DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
>         Method.invoke(Object, Object...) line: 592
>         MethodAdaptor.invoke(Object, Object...) line: 103
>         MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71
>         OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, int,
> BrowserChannel$Value[]) line: 157
>         BrowserChannelServer
> (BrowserChannel).reactToMessagesWhileWaitingForReturn(BrowserChannel
> $SessionHandler) line: 1713
>         BrowserChannelServer.invokeJavascript(CompilingClassLoader,
> JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 165
>         ModuleSpaceOOPHM.doInvoke(String, Object, Class[], Object[]) line:
> 120
>         ModuleSpaceOOPHM(ModuleSpace).invokeNative(String, Object, Class
> [], Object[]) line: 507
>         ModuleSpaceOOPHM(ModuleSpace).invokeNativeObject(String, Object,
> Class[], Object[]) line: 264
>         JavaScriptHost.invokeNativeObject(String, Object, Class[], Object
> []) line: 91
>         Impl.apply(Object, Object, Object) line: not available
>         Impl.entry0(Object, Object, Object) line: 188
>         GeneratedMethodAccessor29.invoke(Object, Object[]) line: not
> available
>         DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
>         Method.invoke(Object, Object...) line: 592
>         MethodAdaptor.invoke(Object, Object...) line: 103
>         MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71
>         OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, int,
> BrowserChannel$Value[]) line: 157
>         BrowserChannelServer(BrowserChannel).reactToMessages(BrowserChannel
> $SessionHandler) line

Re: OOPHM is slow

2009-12-06 Thread keyvez
Hi,

I am experiencing really slow times (30-40 seconds) when I refresh the
page on safari or firefox. It almost seems to recompile the full app
every single time I hit refresh. I don't even change anything, and
this the app you get when you create new Web App in eclipse. Meanwhile
the browser hangs like it's supposed to when making a synchronous
server request.

Specs: Eclipse 3.5, Mac OS 10.6, Java 6 64-bit (tried with 32-bit 5
and 6), GWT 2.0 RC2 and GPE 1.2 RC2 (tried RC1 for both of those too.

And running it with the -Dgwt=perflog=true VM argument I receive this:

perf? OophmSessionHandler?.loadModule Main 838ms

perf? ModuleDef?.refresh 35ms
perf? ResourceOracleImpl?.refresh 1ms
perf? ResourceOracleImpl?.refresh 23ms
perf? ResourceOracleImpl?.refresh 9ms
perf? TypeOracleMediator?.addNewUnits 165ms
perf? ModuleSpace?.onLoad 511ms
perf? Generator 'com.google.gwt.uibinder.rebind.UiBinderGenerator?'
produced 'com.company.mypackage.web.client.Application.Binder' 21ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator
'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator?'
produced
'com.company.mypackage.web.client.Application_BinderImpl_GenBundle?'
4ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator 'com.google.gwt.i18n.rebind.LocaleInfoGenerator?'
produced 'com.google.gwt.i18n.client.impl.LocaleInfoImpl?' 14ms
perf? TypeOracleMediator?.addNewUnits 0ms
perf? Generator 'com.google.gwt.i18n.rebind.LocalizableGenerator?'
produced 'com.google.gwt.i18n.client.impl.CldrImpl?' 0ms

Which doesn't tell me where the 30-40 seconds are being spent.

Any help would be greatly appreciated.

Thanks,
Gaurav

On Nov 8, 1:31 pm, lowecg2004  wrote:
> Hi Andrey,
>
> The initial load can be fairlyslowbut after the first load, are you
> using the hosted browser's refresh button?  This will make subsequent
> loads much quicker.
>
> Cheers,
>
> Chris.
>
> On Nov 8, 8:21 am, Andrey  wrote:
>
>
>
> > Hello!
>
> > WhyOOPHM(and in before hosted mode) is soslow?
> > My application takes about 30-40 sec to start inOOPHM.
>
> > I am using GXT. System is: Intel Core 2 Duo 2.4 GHz, 4 Gb RAM.
> > I've reduced number of remote services from 20 to 3, but it didn't
> > help a lot.
>
> > What takes so much time?
>
> > Am I right that is verification of the code to conform GWT's Java
> > language subset?
> > So, why not make a checkbox "don't verify code" to give an opportunity
> > to run code fast and check it only periodically, say once a day.
>
> > Thanks in advance!
>
> > Andrey

--

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