Re: Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
I have a similar problem that I think started after upgrade to 2.4.0 Dev mode works fine, while web mode does not work sometime after some modifications are done in a part of the code being split. Making full clean build resolves the problem. So it might have to be related to "persisted unit cache" feature of the compiler. On 10/13/11, Salman Hemani wrote: > Thanks guys, I am going to give that a shot tonight! > > On Oct 13, 2:59 pm, Kevin Jordan wrote: >> Yeah, in hosted mode it just goes directly into the onSuccess callback >> whereas in web mode it has to download the piece of javascript needed >> for that point and so that requires it to do it asynchronously which >> means anything else inside your function where you call runAsync will >> be executed while that is still downloading and being parsed. You'll >> want to design it like any other server request you'd make as you >> should assume it will make server call. > > -- > 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. > > -- 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: Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
Just wanted to confirm and also let others who run into this issue in the future know, that based on your hints, I was able to resolve this issue. Thank you! On Oct 13, 5:05 pm, Salman Hemani wrote: > Thanks guys, I am going to give that a shot tonight! > > On Oct 13, 2:59 pm, Kevin Jordan wrote: > > > > > > > > > Yeah, in hosted mode it just goes directly into the onSuccess callback > > whereas in web mode it has to download the piece of javascript needed > > for that point and so that requires it to do it asynchronously which > > means anything else inside your function where you call runAsync will > > be executed while that is still downloading and being parsed. You'll > > want to design it like any other server request you'd make as you > > should assume it will make server call. -- 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: Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
Thanks guys, I am going to give that a shot tonight! On Oct 13, 2:59 pm, Kevin Jordan wrote: > Yeah, in hosted mode it just goes directly into the onSuccess callback > whereas in web mode it has to download the piece of javascript needed > for that point and so that requires it to do it asynchronously which > means anything else inside your function where you call runAsync will > be executed while that is still downloading and being parsed. You'll > want to design it like any other server request you'd make as you > should assume it will make server call. -- 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: Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
Yeah, in hosted mode it just goes directly into the onSuccess callback whereas in web mode it has to download the piece of javascript needed for that point and so that requires it to do it asynchronously which means anything else inside your function where you call runAsync will be executed while that is still downloading and being parsed. You'll want to design it like any other server request you'd make as you should assume it will make server call. -- 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: Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
The only difference between hosted and web mode is that in hosted mode GWT.runAsync() acts synchronously. A code like: void onLoginSuccessful() { doBeforeAppStart(); GWT.runAsync( // load app and start app in onSuccess() ) doAfterAppStart(); } will behave differently in hosted and web mode. In hosted mode it will be executed in the order above but in web mode onSuccess() can be called after doAfterAppStart() has finished. So you may want to check your code to see if it behaves correctly. Otherwise I have not seen any problems with split points so far. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/yO_Ukx6tqv0J. 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.
Code Splitting / GWT.runAsync (Web mode vs. Hosted Mode)
Hi, I am having some difficulty understanding why my code splitting functionality is not working as expected in web mode. I have a decent size application and I've managed to successfully create the split points. The process goes like this: 1. Load the application which takes you to the first view (login page) and the initial code is downloaded 2. The next piece of code is executed if login is successful. This is defined within the GWT.runAsyn(..) call. The issue is that it works perfectly in hosted mode. But when I launch it within the browser without hosted mode, the panel that is initialized under the split point seems like it never actually initialized (onSuccess() did invoke - I put in a Window.alert to test it). Has anyone experienced this before? Or have a suggestion as to where I might start dig deeper? I'll still keep searching but so far have not had any luck. Regards, Salman -- 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.