Re: IE8 application performs better in dev mode than under compiled mode
That makes sense. I wasn't sure exactly how the plugin worked and what javascript was actually running in the browser. On Thursday, July 10, 2014 1:13:09 PM UTC-7, Jens wrote: > > In the meantime though, I'm just frustrated by the fact that I get the >> performance I want when running in DEV mode, but not when it's compiled. >> I'd like to understand is happening in DEV mode that is different from >> compiled that improve performance. Ultimately, the GWT Plugin is serving up >> javascript to IE8 to render, correct? It's just compiling that javascript >> on the fly from the java code. What's different about the javascript being >> generated by the plugin from the javascript genereted by the compiler? >> > > Well while in DevMode your Java code is executed inside your JVM and not > inside the browser as JavaScript. The only thing the browser directly > executes are JSNI calls as they represent native JavaScript calls. What > makes DevMode slow are calls to JavaScript which must go through the > browser plugin. Some GWT SDK classes have optimizations to run faster in > DevMode by avoiding to ask the browser to execute JavaScript. For example > you can have something like > > if(GWT.isScript()) { > // choose implementation that is fast when compiled to JS because it > uses lots of JSNI and native JavaScript features > } else { > // choose implementation that can run in pure JVM to avoid calls to the > browser plugin which cost lots of time in DevMode. > } > > Because you are using IE 8 which isn't the fastest browser it is not > surprising that some parts of GWT are faster in DevMode for you simply > because they are not executed in the browser but instead in the JVM. > > -- J. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: IE8 application performs better in dev mode than under compiled mode
> > In the meantime though, I'm just frustrated by the fact that I get the > performance I want when running in DEV mode, but not when it's compiled. > I'd like to understand is happening in DEV mode that is different from > compiled that improve performance. Ultimately, the GWT Plugin is serving up > javascript to IE8 to render, correct? It's just compiling that javascript > on the fly from the java code. What's different about the javascript being > generated by the plugin from the javascript genereted by the compiler? > Well while in DevMode your Java code is executed inside your JVM and not inside the browser as JavaScript. The only thing the browser directly executes are JSNI calls as they represent native JavaScript calls. What makes DevMode slow are calls to JavaScript which must go through the browser plugin. Some GWT SDK classes have optimizations to run faster in DevMode by avoiding to ask the browser to execute JavaScript. For example you can have something like if(GWT.isScript()) { // choose implementation that is fast when compiled to JS because it uses lots of JSNI and native JavaScript features } else { // choose implementation that can run in pure JVM to avoid calls to the browser plugin which cost lots of time in DevMode. } Because you are using IE 8 which isn't the fastest browser it is not surprising that some parts of GWT are faster in DevMode for you simply because they are not executed in the browser but instead in the JVM. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: IE8 application performs better in dev mode than under compiled mode
Also, I should note that I'm on GWT 2.5.1. We need to upgrade, but are a little too late in the cycle right now. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: IE8 application performs better in dev mode than under compiled mode
I'll try those compiler settings and see if they help (and make sure they don't hurt). And loading a lot of JS/DOM for IE8 is my problem. I'm doing paging and progressive loading to alleviate the issue. With long running scripts, you can periodically check in with the main browser event loop to prevent them if you can break up you work. It's just that it is hard to do when rendering in the grid and we're running out of places to do this. We're going to keep at it. In the meantime though, I'm just frustrated by the fact that I get the performance I want when running in DEV mode, but not when it's compiled. I'd like to understand is happening in DEV mode that is different from compiled that improve performance. Ultimately, the GWT Plugin is serving up javascript to IE8 to render, correct? It's just compiling that javascript on the fly from the java code. What's different about the javascript being generated by the plugin from the javascript genereted by the compiler? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: IE8 application performs better in dev mode than under compiled mode
I think the remaining compiler settings won't buy you a lot additional performance. The reason why the above settings cost you so much performance is that the generated JavaScript will be 2x+ the size than what it should be. Especially recordLineNumbers hurts as GWT will generate one extra line of code to record line numbers for each line of your app code. The most optimized JS you can get is when running the GWT compiler with the following parameters: -XnocheckCasts -XnoclassMetadata -XclosureCompiler -optimize 9 This removes all dynamic class cast checks (no ClassCastException anymore), all class metadata (e.g. Class.getName() will return junk) and runs the final JS through the closure compiler again to safe some additional bits. But again this probably doesn't give you a lot performance and might even be dangerous if your app depends on correct class names from Class.getName(). If you app is still slow then your app is simply doing too much JS / DOM work for IE 8. Most likely you load too much data from the server and display too much stuff at once. In IE 8 for large data tables you should migrate to CellTable / DataGrid which are a lot faster in IE 8 than traditional GWT widgets. You could also check if you attach a parent widget to the DOM and after it is attached you make for loops to append childs to it. This can also hurt as the browser will do layout recalculations for each child added. Instead first add childs to the parent and then attach the parent to the DOM. Then the browser only needs to do one layout recalculation. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
IE8 application performs better in dev mode than under compiled mode
I have a complex web application that I have to get running under IE8 (no choice on this). I've been dogged by performance issues for weeks. The application runs really slow. I get the annoying "Do you want to stop running this script?" warnings. We've been optimizing for weeks and made some progress getting it to run faster with fewer script warnings, but still not quite there. Then, I noticed that the application performs great when I'm hitting gwt.codesvr. The application runs quickly. I get no script warnings. This is counter-intuitive, because I've found that applications perform worse in dev mode than with compiled mode. I couldn't figure why. So, I went to a colleague and he suggested looking at the compiler settings. I found that we had them set like this: I set recordLineNumbers and recordFileNames to false. Instantly, the application performed much better in compiled mode. The speed was now comparable to what I was seeing with dev mode. I did some more research on the forums and found that running stackMode as emulated impacts performance as well. So, now I have them set like this: This helped performance a little. Not as dramatic as changing the other settings to false, but there was some improvement. Here's my problem. I'm still getting the "Do you want to stop running this script?" warnings in compiled mode where I don't get them in dev mode. Is there something else I can try to get compiled mode to perform like dev mod? Is there a compiler setting (or some other setting) I can look at that could help? What compiler settings are being used in the code server? Is there anyway I can see how they're set? Any other suggestions? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.